Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Write in a specific field in Excel

Creator
Creator
Hi, I discover the functionality to read/write in Excel. I want to write results in a specific field in a sheet in Excel for example ( C3:C4000). How I can do that , because with the command writeexcelfile I can only choose my sheet and NOT a specific field. The same question for readexcelfile but I think it's the same idea. Many thanks,
1 REPLY 1

Re: Write in a specific field in Excel

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Jer_N,

 

you can use the COM Interface to achieve this:

is
do
	local Excel := CreateCOMObject("Excel.Application", "");
	Excel.Visible := true;
	Excel.Workbooks.Add;
	Excel.Columns(1).ColumnWidth := 20;
	Excel.Cells(1,1).Value := "Test";
	Excel.DisplayAlerts := false;
	Excel.Quit;
end;

But please be aware that this is not very fast since Excel has to be started for every request.

 

Using the Active/X interface would speed this up, but you need the optional Interface Package for using this.

 

Regards,

Ralf

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.