Showing results for 
Search instead for 
Did you mean: 

exporting data to exiesting excel shhet

Go to solution

Hi All....


How do i export data to existing excel sheet?


ie,i want to export to the same sheet whenever the program executes.


if the sheet already contains data,then have to overwrite....


Thanks in advance

0 Kudos
Message 1 of 19

There is a shipping example using AcxtiveX (C:\Program Files\National Instruments\LabVIEW 8.6\examples\comm\ExcelExamples.llb) that shows how to write to a specific range of cells in Excel. That should solve completely your problem.

Chilly Charly    (aka CC)
Message 2 of 19



Thank you for the reply.Now i camn open an existing file.But fail to write data to that....

I want to display the 2D array .But i cudnt find a way...I cudnt wire the two...

as one ois deeling with work sheet and the othere reference... 

Pls help me on this


Thanks again...


Am just sending my ciode extract...



0 Kudos
Message 3 of 19

From your attached jpg, I can see you are using the Excel report toolkit.

Why don't you simply create a new report and use the same file name to overwrite the data ?

Chilly Charly    (aka CC)
Message 4 of 19
Thank u so much for the repy..can u pls send sample code if u hev some wth using LV 8.0
0 Kudos
Message 5 of 19
May be you could have a look in your own example folder ? Try C:\Program Files\National Instruments\LabVIEW 8\examples\comm\ExcelExamples.llb
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 19

Thanks again...i gone thru the examples b4 ....But cudnt find a solution to my problem...


Thanks for help

0 Kudos
Message 7 of 19
I can't see where you are stuck. May be you should be more specific whith your question : prepare a set of test data that you would like to write to an existing Excel sheet. Post both the data and the sheet. Post also a prototype, as simple as possible of your code.
Chilly Charly    (aka CC)
0 Kudos
Message 8 of 19

Thank u so much for the timely help.


I have a module in our software to display data and then to export to excel.


When viewed in labview window...all coming good...But when exporting to excel some date getting changed...


dates like13/12/2008,11/11/2008...displaying correctly in excel...But dates like 03/02/2008 getting changed as 02/03/2008...


I thought of fixing in one of the two ways...1 way is to use set column format as dd/mm/yyyy using excel set cell code snap i am attaching herewith.


The second keep an excelsheet whose first field is in the format dd/mm/yyyy and always display the data in that sheet..that code i have posted earlier to u and we were discussing on that issue...


The two methods fails for me...Whatever method is ok..

Pls help me in finding a work around for this issue.



Thanka again...

Download All
0 Kudos
Message 9 of 19

As I asked before, post a working example exibiting your problem (ie a VI writing a set of data that don't display correctly in Excel). Otherwise we wont be able to reproduce your problem and help to solve it.

In a previous post, the date problem was solved by adjusting the cell format to string before writing the data, then reverting to date after. Did you try that solution ?

Chilly Charly    (aka CC)
0 Kudos
Message 10 of 19