Jump to content

problem reading excel file


Recommended Posts

You can't read excel files, because they are not plain text. LV either reads just plain text (tab separated text-file) or binary. Reading binary also reads all the formatting in the .xls file, thus you won't have usable data in LV.

To read .xls files you'll have to use active-X. This means, control Excel from your app, let excel read the file and then read the cell data from excel (so do other applications that read excel files, like word with embedded excel sheet in your document).

For first help see the examples of LV (Menu: help>>find examples...): Write Table to XL.vi

or from the knowledge base of NI (www.ni.com, "NI Developer Zone").

It's not the easiest job, since the object model of Microsoft is quite deep in hierarchy and depend on your office version.

If possible, you should consider to save your excel sheet as .csv file (which is a comma-separated text file, easy readable from LV) in excel.

A good help is also the report generation toolkit from LabVIEW, but it's not free of charge.

Didier

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.