03-04-2025 08:59 AM - edited 03-04-2025 09:01 AM
Hi
I want to write a labview code to write a text file on computer. if the date is 1st of month it should create new file otherwise existing file will be updated for 29 days for attendance of 10 employees. first row need to be , Name and days of month like, Name , 1, 2, 3, upto 30 and 1st column should be names of employees , like michael, Ronald, donald , etc . when record butten is pressed it should append attendance on file every day for 30 days and on new month it should create another file .
Regards
Solved! Go to Solution.
03-04-2025 10:21 AM
03-04-2025 11:21 AM
We are using ni products like NI 6289 ni pci 6025 for long time for signal acquisition and stepper motor control. But i never worked with administrative apps. Therefore i want to build an application to keep our members as track and in a file
Thanks
03-04-2025 03:26 PM
03-04-2025 06:07 PM
LabVIEW 2014, pls
03-05-2025 06:40 AM
who is using your attendance.vi? the individual employee, or somekind of supervisor? who logs a new entry?
some ideas:
- 'write delimited spreadsheet' can append new rows (1d array=new entry) to an existing file if set to true, and if set to false, will generate a new file
- don't forget to set the delimiter , which EXCEL is waiting for, in Europe the default is ';'
- 'get Date/Time' gives you an UTC timestamp which may be formatted with %d via 'format date/time string' to test if its output is equal to '01'
03-05-2025 09:54 AM
Thanks
yes one supervisor will check mark or turn leds Green for each employee. And then click record button.
I tried using spreadsheet vi. It refreshes all titles and attendance every day i click record. Instead i need to write first colmn and first row once and append attendance on daily basis on same file
03-05-2025 11:16 AM
Maybe post what you have and we can help. It kinda seems like you want us to write it for you- it's hard to figure out what you did wrong if you don't show us what you've tried.
03-05-2025 03:11 PM
Can you live with the following?
I have several reasons to have a completely different style on the diplay and the file content. The file content should contain all relevant information and nothing more.
Persons may be changed each month but be careful with that for history reasons.
I start with reading and writing a month file
In it should be a list of names and their attendances until today
It also should give the opportunity to edit a new day and write it at the end of the day as one file
A list of names and ordering numbers ( the numbers are needed to reorder the names)
The numbers are delivered at the beginning so people can be added and removed but names and numberes stay
To begin with, people who are removed from the list will get a negative number to indicte the do not need to be displayed
But not yet implemented but kept to be future proof over at least a month.
The file structure will be as follows for 3 people whose names are a b, c d, e f.
The attendeces will have a line for each day to make adding days easy and a P or L for each person per day.
In fact only presences should be filled in. the leaves should be detected and filled in when writing the file.
-------------------------------------------------------------------
Month 2025 3
Persons
a b 1
c d 2
e f 3
Attendences
1 P P L
2 P L L
etcetera
03-05-2025 05:53 PM
Use a String 2D array and save using Writing to Spreadsheet .