LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Excel

Solved!
Go to solution

I am creating an issue and return database for a library.

I want to use an Excel file for database.

This database consists of Book number,Book name, Student roll number,student name, time and issued/returned.

For each issue/return, all the above have to be as a row and added to the last row of an Excel file. 

Can you please suggest me a VI to done this operation.

0 Kudos
Message 1 of 6
(2,752 Views)

Hi Ravi,

 

LabVIEW brings the RGT (ReportGenerationToolkit) to operate with MS Office files like XLS(X).

And it also brings a lot of example VIs in the example finder to learn how to use all those functions…

 

What have you tried?

Where are you stuck?

Can you attach your current VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,727 Views)

If you by Excel file, means "Excel" file, then a .csv is very easily handled in LV.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 6
(2,713 Views)

We can be more helpful if, in addition to posting your Class Assignment, you also post your initial attempts to do the Homework.  Be sure to attach your LabVIEW code (the files with the .vi extension, not a Screen shot of the Block Diagram).  From your code, we can determine many things, including the LabVIEW Version you are using, what "lies behind" some of the Structures on your Block Diagram (i.e. we can see all of the Cases in the Case Structure, we can expand Express VIs, etc.), and we can see where you may need a hint to understand key LabVIEW concepts.

 

Bob Schor

0 Kudos
Message 4 of 6
(2,695 Views)

Hi,

I am attaching my two VIs.

One is my main VI i.e. issue&return.vi

It will be give the outputs of Book number, Book name , Student Name, Student No, Time and Issued or Returned status in the form of ini file. But I want to make it in a excel file. Excel is easily understandable by any user. For that I am trying to create a sample VI i.e. excel.vi in order to know the excel operations. I want to insert the above inputs as a row to the last row of the database. But I am not able to insert a 1D array to the excel. And also I want to do it in background process. I mean the excel is opening when i use NewReport.vi , I want it not happen foreground while running the VI. Can You suggest me the process to solve my problem.

Download All
0 Kudos
Message 5 of 6
(2,684 Views)
Solution
Accepted by topic author Ravi_Teja_2307

You want to create an Excel .xlsx file without "seeing" Excel open and close. 

To run the routine without Excel opening, wire a Constant to the upper-left terminal of New Report and choose the Enum value "Minimized".

 

Excel Easy Table takes 2D data.  Here I'm using String data, but it will also work with numerics.  If you want to write a single Column, as we do in #7 and #9 of the Example, create a 1D row of data (a 1D array is inherently a "row"), pass it through Build Array to make it a 2D N x 1 Array, then transpose it to make it a 2D 1 x N "Column" Array.

 

You also mentioned inserting after the "last row" -- fortunately, there is a "Last Row" function in the RGT.

 

Finally, this Example was developed with Office 2013.  If you are using a newer version of Office, the Save Report to File function in the Example will be broken.  Replace it with the Function from your version of LabVIEW.  [There's a fix mentioned somewhere here in the Forums -- if you get stuck, I can probably tell you how to fix it].

 

Bob Schor

0 Kudos
Message 6 of 6
(2,656 Views)