LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving excel sheet from different files to excel template

Hi Everyone,

 

I need help from you guys..:) I want to fetch excel sheet from different files (say for example from 3 excel files) and put in to one template file. If any one have idea regarding this please let me know. Thanks in advance

 

 

Thanks & Regards

saamy

0 Kudos
Message 1 of 8
(3,464 Views)

I guess you can do that using ActiveX but not sure how to create a template. Try searching in the Excel Board

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(3,456 Views)

Hi Anand, Thanks a lot for the reply. Ya I know using activeX we can copy to another workbook... But what I want is, I want to add these sheets to my excel template...For eg: I have three excel files, from these files I want to take one sheet from each file and put in to the excel template..If you have any idea plz let me know..Thanks in advance..

0 Kudos
Message 3 of 8
(3,452 Views)

Hi Sammy,

 

Please have a look on this link, might help.

 

http://zone.ni.com/devzone/cda/epd/p/id/3409

0 Kudos
Message 4 of 8
(3,431 Views)

@saamy wrote:

Hi Everyone,

 

I need help from you guys..:) I want to fetch excel sheet from different files (say for example from 3 excel files) and put in to one template file. If any one have idea regarding this please let me know. Thanks in advance

 

 

Thanks & Regards

saamy


 

 

http://forums.ni.com/t5/LabVIEW/Copy-an-excel-worksheet-from-one-workbook-to-another/td-p/1880539 previous discussion of same topic.

 

 

0 Kudos
Message 5 of 8
(3,426 Views)

Hii Puneet K & nyc,

 

Thanks a lot for ur links guys...:) am already done :)...will upload the working code shortly...and am facing some other problem now...when I execute the program in LV 11.0 version its working fine, but when I try to run the same code in LV10.0 (32 bit machine) its showing this error

 

"Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook.Help Path is C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM and context 0 in copy_excel_worksheet.vi

This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.

Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2146827284) or for its hexadecimal representation (0x800A03EC)."

 

 

If you guys know the solution please let me knoe...thanks in advance..:)

 

 

Thanks & Regards

saamy

0 Kudos
Message 6 of 8
(3,412 Views)

Hello guys,

 

Am getting error like "

 

"Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook. To move or copy the data to the destination workbook, you can select the data, and then use the Copy and Paste commands to insert it into the sheets of another workbook.Help Path is C:\Program Files\Microsoft Office\Office12\1033\XLMAIN11.CHM and context 0 in copy_excel_worksheet.vi

This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.

Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2146827284) or for its hexadecimal representation (0x800A03EC)."

 

" this when I try to copy a worksheet to another workbook. can any1 help to overcome this problem. I have attached the code.

 

Please check the attachment.

 

My labview version is 11.0

 

Thanks in advance

 

Thanks & Regards

Saamy

 

0 Kudos
Message 7 of 8
(3,394 Views)

MS Office 11 only supports 64K rows, while Office 12 supports 1 million.  If you open a LV generated spreadsheet file, it will be converted to the 1 million row format automatically.  If you open the older Office 11 format (i.e. your template.xls file), it will be opened in "Compatibility Mode" and restricted to 64K rows.  This will prevent you from copying the whole sheet from the new file to the template.

 

Your options are:

1. Save the template as a XLSX file to upgrade the format

2. Use Save As on the new file to create a native .XLS workbook file before the move

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 8 of 8
(3,368 Views)