Jump to content

read and delete excel file


Recommended Posts

Hi,

I've build a VI to read all sheets in an Excel file. It works well but when I'm using it in another VI and that I access the same Excel file, for example with the delete file VI, an error is generated. If the two VI are used separatly, no problem occurs.

I attach the VI I'm using to test the availability of the Excel file after the read operation is completed. The erasing of the file doesn't work, but some other actions can't be done (save, etc.).

It seems as if an opened reference is not closed (even if I've tried to do to my best to close them all !)

I know the report generation toolkit exists but we don't have any money to spend in this solution that don't correspond to our needs.

I'd be grateful if someone could tell me what is going wrong in my VI, I's been a long time I've been trying and all my ideas failed for the moment...

Thank you in advance for your help.

Bim

Download File:post-1776-1133362018.llb

Link to comment

Just a quick guess, I didn't test it, but in VI: "XLspecial_GetAllExcelData.vi" you have a FOR loop where you create references to each sheet in the workbook, but on the right side of the loop you have indexing disabled on the references coming out, so the Close Reference nodes only close the last reference(s) generated by the loop. The rest might be left dangling. You might want to enable referencing and enclose those Close REfs in another loop, or pull them into your current FOR loop.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.