Hi all,
I am trying to add the boreders for the datas exported to excel.
So I try to make use of the function BorderAround function available in Excel Buffer table.
But When I try to run the excel , it is giving me the error
"The Automation Variable is not instantiated".
The coding I have given for Body section is as follows.
//ExcelBuf.CreateRangeName('Range',1,1);
ExcelBuf.StartRange;
ExcelBuf.AddColumn('Depot Code',FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[1],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[2],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[3],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn('Total',FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[4],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[5],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[6],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn('Total',FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[7],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[8],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn(gItemName[9],FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.AddColumn('Total',FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.EndRange;
ExcelBuf.CreateRangeName('Range',1,1);
ExcelBuf.CreateRange('Range');
ExcelBuf.BorderAround('Range');
I think the sequnce I am calling the function is wrong.
If anyone know the correct sequence to make the BorderAround function to work,Kindly correct the code above or tell me the correct sequence.
Thanks in advance.
Regards,
Chandru.
0
Comments
(viewtopic.php?f=14&t=11801&hilit=excel+border)
I have searched in the link which you have sent. It contains queries for adding borders through automation and not uisng the BorderAround function of Excel Buffer.
Kindly let me know how to add borders using the BorderAround function in ExcelBuffer.
Thanks in advance.
Regards,
Chandru.
By modifying the LineStyle, I go the output.
Thanks a lot.
Regards,
Chandru.
If you want to use the Excelbuf.BorderAround, this is an sample of the code.
ExcelBuf.CreateRangeName(ExcelBuf.GetExcelReference(8),1,5);
LInt_RowCounter := 5;
LInt_ColCounter := 1;
REPEAT
REPEAT
ExcelBuf.SetCurrent(LInt_RowCounter,LInt_ColCounter);
ExcelBuf.StartRange;
ExcelBuf.SetCurrent(LInt_RowCounter,LInt_ColCounter);
ExcelBuf.EndRange;
ExcelBuf.CreateRange(ExcelBuf.GetExcelReference(8));
ExcelBuf.BorderAround(ExcelBuf.GetExcelReference(8));
LInt_ColCounter := LInt_ColCounter + 1;
UNTIL LInt_ColCounter > (GInt_ColCounter + 1);
LInt_ColCounter := 1;
LInt_RowCounter := LInt_RowCounter + 1;
UNTIL LInt_RowCounter > (GInt_RowCounter + 1);
Tan Eng Siong
IF Row < 10
THEN TempExcelBuffer."Border Style" := 0
ELSE TempExcelBuffer."Border Style" := 1;
http://www.youtube.com/watch?v=WQ63cFCPBOQ
From:
viewtopic.php?f=23&t=45618
just to add some more info.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I am getting an error like The automation Variable has not initiated ](*,) . Please can u guide me through it? :?: Can i use the same code to create boarder for all variable which i am inserting into excel :-k , ie all entries in excel is inside a box...