range of cells border question
-
I'm having trouble getting the different line weight. Let's say to have cells from A1 to A3... I would like to have the border to be medium weight continuous line around this range, while having the hairline hortizontal line inside. This is what I have:
xlRange = (Excel.Range)xlWorkSheet.get_Range(Cell_1, Cell_2);
xlRange.Borders.Weight = Excel.XlBorderWeight.xlMedium;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous;xlRange.Borders.Weight = Excel.XlBorderWeight.xlHairline;
xlRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;I got hairline weight continuous line in this on around each cell in this range... huh?
-
I'm having trouble getting the different line weight. Let's say to have cells from A1 to A3... I would like to have the border to be medium weight continuous line around this range, while having the hairline hortizontal line inside. This is what I have:
xlRange = (Excel.Range)xlWorkSheet.get_Range(Cell_1, Cell_2);
xlRange.Borders.Weight = Excel.XlBorderWeight.xlMedium;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous;
xlRange.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous;xlRange.Borders.Weight = Excel.XlBorderWeight.xlHairline;
xlRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;I got hairline weight continuous line in this on around each cell in this range... huh?
Blubbo wrote:
xlRange = (Excel.Range)xlWorkSheet.get_Range(Cell_1, Cell_2); xlRange.Borders.Weight = Excel.XlBorderWeight.xlMedium; xlRange.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders.Weight = Excel.XlBorderWeight.xlHairline; xlRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;
?
Bastard Programmer from Hell :suss:
-
Blubbo wrote:
xlRange = (Excel.Range)xlWorkSheet.get_Range(Cell_1, Cell_2); xlRange.Borders.Weight = Excel.XlBorderWeight.xlMedium; xlRange.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders.Weight = Excel.XlBorderWeight.xlHairline; xlRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;
?
Bastard Programmer from Hell :suss:
-
Blubbo wrote:
xlRange = (Excel.Range)xlWorkSheet.get_Range(Cell_1, Cell_2); xlRange.Borders.Weight = Excel.XlBorderWeight.xlMedium; xlRange.Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; xlRange.Borders.Weight = Excel.XlBorderWeight.xlHairline; xlRange.Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous;
?
Bastard Programmer from Hell :suss: