LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write into worksheets and close excel

Untitled.png

 

 

can someone tells me why this doesnt work?

 

i tried to

open excel, open worksheet, write to new worksheet #2, autofit to one page for work sheet #2,

write to new worksheet #3, autofit sheet #3. 

 

all those are working...

 

but when i tried closing the excel and saving it is when i have alot of errors. 

can someone help me?

thanks

 

 

Download All
0 Kudos
Message 1 of 15
(3,482 Views)

Untitled.png

 

i was able to do this.  

but this really beats the purpose of automating it because i still have to click on SAVE, AND SAVE as excel, etc. 

 

0 Kudos
Message 2 of 15
(3,454 Views)

Try to use _Workbook | SaveAs method and set the ConflictResolution to 1

excel_save_wb_as.png

0 Kudos
Message 3 of 15
(3,431 Views)

hmm, that didnt work for me.

 

0 Kudos
Message 4 of 15
(3,390 Views)

I will post my Excel automation library tonight. I never had problems with pop ups or other errors.

Message 5 of 15
(3,374 Views)

Check this VI.

 

Excel.png

Munna
Message 6 of 15
(3,358 Views)

I uploaded some code and example here: https://decibel.ni.com/content/docs/DOC-39826

Message 7 of 15
(3,317 Views)

I'm not sure which version of LabVIEW you are using, nor what some of the VIs are in your code.  However, if you have a recent version of LabVIEW (say 2012 or later) and have access to the Report Generation Toolkit, you will have a much easier time working with Excel.

 

In January of this year, I posted an Example to replace the Excel example that ships with LabVIEW.  However, I'm not very good at finding my own posts on this forum, so I can't easily point you to it.  However, if you do use the Report Generation Toolkit and do not use ActiveX calls, you will find that the functions to open and close Excel Reports tend to work without significant problems (there is a glitch, that I've reported, whereby if you "manually" close the Excel Workbook and then try to close it with the Report Generation's "Save Workbook", it will actually delete the manually-saved Workbook for you)(there is a "work-around" until NI fixes this ...).

 

Bob Schor

0 Kudos
Message 8 of 15
(3,277 Views)

My previous post to which I referred is called:  Revised "Generate Excel Report" Example   (The Quotes are part of the title).

 

BS

Message 9 of 15
(3,271 Views)

hi chembo,

thank you!

but i am currently using labview 2010 right now.

i made the purchased for the new labview software so maybe i can view it later.

 

but i think we got the report generation kit so i'll test that out too. i heard its easier to make reports with it.

thanks

 

0 Kudos
Message 10 of 15
(3,223 Views)