Read lvm file in excel
Hi.
How do you open and read a lvm file in excel spreadsheet?
The hardest problem is just seeing it. In the File of type field in the file dialog, select All Files (*.*). Navigate to your file and select it. Excel will correctly interpret the LVM file as a text file and import it. If you use the default settings (tab separator), just hit the Finish button and it will be imported.
NOTE: An LVM file can easily be longer than Excel can import. I haven't tried, but I think it will just truncate the file with a warning.
This account is no longer active. Contact ShadesOfGray for current posts and information.
Similar Messages
-
Unable to read the file in excel..
Hi all,
I created a report.for this report It was an excel template. when I click on view button I am getting an error Unable to read file.
I checked my query in database it retrieving 43000 records.
When I am going for rownum<1000 my report is giving successful results.But when I am removing that condition in where clause I am getting error Unable to read file.
Can any one pls help in this.....
Thanks,
KSS.Not that this really answers your question but... 45K records seems like a lot of data. Perhaps you need to add some conditions to your SQL to limit the records to a more manageable size and make the results more relevant to the task. Just an opinion.
ds -
Problem in Reading XLSX File (MS EXCEL 2007).
Dear All ,
I am reading all the properties to XL sheet and then utilising it in my code .
I am getting some problem in reading the Border of the Cell , my code is working fine with most of the Excel Sheet but it can not correctly read the Border of a few Excel files.
I am using the method ,
getBorderBottomEnum()
or
getBorderBottom()
but I can not read the Border used correctly for all the Excel Sheet .
Please Help.
Please revert if I am not clear.
Thanking You All.I'm guessing that your question is about Apache POI. They don't have a forum AFAIK, but they do have a [url http://poi.apache.org/mailinglists.html]mailing list.
John -
Problems with displaying read data from a .lvm file
Hi all.
I aquire data with the PCMCIA card 6036E. I aquire online in Labview 7 and store the data in a .lvm file. When i try to display the same data i aquired before with the "read .lvm file" express vi, the waveform chart redraws itself after an undefined time, sometimes it redraws faster and sometimes it takes longer. WHY? i have only one header per aquisition and if i restart the aquisition a new file is written! I tried almost everything. Is this a bug from labview 7?
I really appreciate your help.
best regards,
BerndHi Khalid,
Here is a simplified version of my VI and also 2 .lvm files from the logged data. Sorry for the size, but I aquire with a sample rate of 20 kS/s and my main frequency is only 0.3 Hz. In the 6MB file I aquired a little more than 3 periods. When you run the VI with this file at the beginning it redraws very often and very fast, then after some time it draws about 1 period and then it redraws again and so on. I want that the hole data from this file is displayed at once. The 900kB file is aquired with 10kS/s and about 1.5 periods. This is the last size the displaying is working with. You think it is possible that the VI only works until 1MB? But my data usually is much bigger than that. I hope you can use the data because it is
zipped, but otherwise it wouldnt be possible to post it.
Thank you very much for your help, I really appreciate it!
Best regards,
Bernd
Attachments:
simplified_VI_for_offline_data_display.vi 79 KB
2004-07-01_Messung9.zip 191 KB
2004-07-01_Messung4.zip 680 KB -
Can i open lvm file in a Pocket PC emulator?
Hi all, can i open lvm/xls file in a Pocket PC emulator? I keep getting an error msg...
Thanx!I was wrong. It does not appear that PocketExcel will open an LVM file, at least not in Windows Mobile 2003 on my Dell Axim X50v. However, there is a fairly easy workaround, if you have a copy of Excel (or OpenOffice, which is free). Open the LVM file in Excel, save as an Excel binary (XLS) file, then drag the Excel file to your synch folder. ActiveSync will convert the XLS file to pocket Excel format on transfer. You can then open it in PocketExcel. You can use ActiveX to save directly to an XLS file, or use the report toolkit to make your life a bit easier.
It is possible that you can do this, since I am a fairly new Windows Mobile user. I tried a simple copy of the LVM file and tried changing the file extension to .txt. I could not get PocketExcel to even look at it, although, as you mentioned, Pocket Word opened it with no problem. Diving into the documentation did not help much either. If anyone else having a bit more experience has a better solution, I would love to hear it.
This account is no longer active. Contact ShadesOfGray for current posts and information. -
Spectral analysis with 10 averages using 10 lvm files
Hi
I would like to create a spectal analysis of some results i have saved in lvm files in labview 7
is it possible to use the averaging option in the spectral measurement function to do 10 averages if i read 10 lvm files
ie.
Read lvm file #1
do spectrum analysis
read lvm file #2
redo spectrum analysis and average results between file #1 and file #2
read lvm file #3
ect
Thanks in advance
Mark Thompsonhi there
you can swop the order of calculating the average and the FFT. So first read all lvm files, average the time based data and then do the FFT over the averaged data.
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!" -
Read several 2D Arrays out of lvm file
Hello,
for my data aquisition, I join three 1-D Arrays to a 2D array. I then save several of these 2D Arrays to a lvm file, until it exceeds 500kb. Here I ues the "write to measurement" express VI. When I'm trying to read the data I encounter a problem:
the "read from measurement file" express vi, seems to only give out the first 2D Array, that is in the file! Each 2D Array holds 75 values for every channel. I checked the content by dragging and dropping the file to Excel and the notepad. I can then see all the arrays, I saved in the file, and not only the first one. I tried to adjust the options in the "read from measurement file" VI as well, but nothing seems to help.
I attached an example lvm file and my reading VI.
It would be very nice if somebody could help
Simon
Solved!
Go to Solution.
Attachments:
Datenauswertung.vi 52 KB
example file.zip 68 KBHi
I'm not really sure which way you want to read out the data.
Do the different 2D Array all belong together, meaning that the 2nd array is just a continuation of the first?
If this is the case, you could select "Segment Headers">"No Headers" in the "Write to measurement file" VI.
Then, in the "Read from measurement file" select: Read generic text file, and set the parameters accordingly.
Use the "Read File now" function to test the set parameters.
Further you may have to change the indices for the Index Array in your VI.
However, this method has the obvious drawback of loosing the header information.
Alternatively, you can save the data in a tdms file, instead of a lvm file. Here the headers are handled better.
Select "One header only" in the write to measurement file. When your then read out the data, it automatically will read out all data.
And you keep the information of at least the first header.
If each 2D Array should be read out separately, you should use a different approach. Please let me know, if this is the case and I will explain further.
Kind regards,
Corinne Doppmann
Applications Engineer
National Instruments -
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com -
How to read the data from excel file and store into the table?
Hi All,
I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
All the excel fields and my table columns are same.
Can you share with me how can acheive this using LOB's?
ThanksHi OraSuirya,
you can try with external tables .
syntax as follows
create table ext_table_csv (
i Number,
n Varchar2(20),
m Varchar2(20)
organization external (
type oracle_loader
default directory ext_dir
access parameters (
records delimited by newline
fields terminated by ','
missing field values are null
location ('file.csv')
reject limit unlimited;
For this you need to create directory
Directory Creation syntax:
create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
grant read, write on directory ext_dir to <User>;
please paste the excel file in the particular directory .
I hope this will help you.
Please correct me if I am wrong anywhere .
Thanks,
Tippu. -
Reading the data from excel file which is in application server.
Hi,
Iam trying to read the data from excel file which is in application server.
I tried using the function module ALSM_EXCEL_TO_INTERNAL_TABLE. But it didn't work.
I tried just reading using open data set and read data set it is giving junk characters.
Please suggest me if you have any solution.
Best Regards,
Brahma ReddyHi Narendra,
Please see the below code I have written
OPEN DATASET pa_sfile for INPUT in text mode ENCODING DEFAULT MESSAGE wf_mess.
CHECK sy-subrc = 0.
DO.
READ DATASET pa_sfile INTO wf_string.
IF sy-subrc <> 0.
EXIT.
else.
split wf_string at wl_# into wf_field1 wf_field2 wa_upload-field3
wa_upload-field4 wa_upload-field5 wa_upload-field6 wa_upload-field7 wa_upload-field8
wa_upload-field9 wa_upload-field10 wa_upload-field11 wa_upload-field12 wa_upload-field13
wa_upload-field14 wa_upload-field15 wa_upload-field16 wa_upload-field17 wa_upload-field18
wa_upload-field19 wa_upload-field20 wa_upload-field21 wa_upload-field22 wa_upload-field23
wa_upload-field24 wa_upload-field25 wa_upload-field26 wa_upload-field27 wa_upload-field28
wa_upload-field29 wa_upload-field30 wa_upload-field31 wa_upload-field32 wa_upload-field33
wa_upload-field34 wa_upload-field35 wa_upload-field36 .
wa_upload-field1 = wf_field1.
wa_upload-field2 = wf_field2.
append wa_upload to int_upload.
clear wa_upload.
ENDIF.
ENDDO.
CLOSE DATASET pa_sfile.
Please note Iam using ECC5.0 and it is not allowing me to declare wl_# as x as in your code.
Also if Iam using text mode I should use extension encoding etc.( Where as not in your case).
Please suggest me any other way.
Thanks for your help,
Brahma Reddy -
Reading data from an excel file
Hi,
I want to read data from the excel file and display it in
jsp page. Iam getting the following error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:mydsn","","");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from [holidays$]");
Here i have created the dsn with the name "mydsn". I have the
following data in the mydsn.dsn file:
[ODBC]
DRIVER=Microsoft Excel Driver (*.xls)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
ReadOnly=1
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=excel 8.0
DriverId=790
DefaultDir=D:\WorkSpace\Projects\VINET\devl\webroot\jsp
DBQ=D:\WorkSpace\Projects\VINET\devl\webroot\jsp\list_of_holidays_2003.xls
thanks in advance
phani.You might want to look at the POI project (an open source Jakarta sub-project) that allows you to create/modify/read excel files via Java code. That might be more flexible and easier than what you're currently trying to do.
Cheers -
GUI_UPLOAD to read data from an Excel File
Hi Folks,
I'm using FM GUI_UPLOAD to read data from an Excel File. But all I see in the table returned is 1 row with garbage values (special chacaters). Excel Workbook has proper data in the sheet, but its not getting uploaded properly. Sy-subrc is 0.
What could be the reason?
Thanksuse FM : ALSM_EXCEL_TO_INTERNAL_TABLE
See the example program to get from XLS file to Internal table
REPORT ZLWMI151_UPLOAD no standard page heading
line-size 100 line-count 60.
*tables : zbatch_cross_ref.
data : begin of t_text occurs 0,
werks(4) type c,
cmatnr(15) type c,
srlno(12) type n,
matnr(7) type n,
charg(10) type n,
end of t_text.
data: begin of t_zbatch occurs 0,
werks like zbatch_cross_ref-werks,
cmatnr like zbatch_cross_ref-cmatnr,
srlno like zbatch_cross_ref-srlno,
matnr like zbatch_cross_ref-matnr,
charg like zbatch_cross_ref-charg,
end of t_zbatch.
data : g_repid like sy-repid,
g_line like sy-index,
g_line1 like sy-index,
$v_start_col type i value '1',
$v_start_row type i value '2',
$v_end_col type i value '256',
$v_end_row type i value '65536',
gd_currentrow type i.
data: itab like alsmex_tabline occurs 0 with header line.
data : t_final like zbatch_cross_ref occurs 0 with header line.
selection-screen : begin of block blk with frame title text.
parameters : p_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
g_repid = sy-repid.
at selection-screen on value-request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = g_repid
IMPORTING
FILE_NAME = p_file.
start-of-selection.
Uploading the data into Internal Table
perform upload_data.
perform modify_table.
top-of-page.
CALL FUNCTION 'Z_HEADER'
EXPORTING
FLEX_TEXT1 =
FLEX_TEXT2 =
FLEX_TEXT3 =
*& Form upload_data
text
FORM upload_data.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = $v_start_col
I_BEGIN_ROW = $v_start_row
I_END_COL = $v_end_col
I_END_ROW = $v_end_row
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
write:/10 'File '.
ENDIF.
if sy-subrc eq 0.
read table itab index 1.
gd_currentrow = itab-row.
loop at itab.
if itab-row ne gd_currentrow.
append t_text.
clear t_text.
gd_currentrow = itab-row.
endif.
case itab-col.
when '0001'.
t_text-werks = itab-value.
when '0002'.
t_text-cmatnr = itab-value.
when '0003'.
t_text-srlno = itab-value.
when '0004'.
t_text-matnr = itab-value.
when '0005'.
t_text-charg = itab-value.
endcase.
endloop.
endif.
append t_text.
ENDFORM. " upload_data
*& Form modify_table
Modify the table ZBATCH_CROSS_REF
FORM modify_table.
loop at t_text.
t_final-werks = t_text-werks.
t_final-cmatnr = t_text-cmatnr.
t_final-srlno = t_text-srlno.
t_final-matnr = t_text-matnr.
t_final-charg = t_text-charg.
t_final-erdat = sy-datum.
t_final-erzet = sy-uzeit.
t_final-ernam = sy-uname.
t_final-rstat = 'U'.
append t_final.
clear t_final.
endloop.
delete t_final where werks = ''.
describe table t_final lines g_line.
sort t_final by werks cmatnr srlno.
Deleting the Duplicate Records
perform select_data.
describe table t_final lines g_line1.
modify zbatch_cross_ref from table t_final.
if sy-subrc ne 0.
write:/ 'Updation failed'.
else.
Skip 1.
Write:/12 'Updation has been Completed Sucessfully'.
skip 1.
Write:/12 'Records in file ',42 g_line .
write:/12 'Updated records in Table',42 g_line1.
endif.
delete from zbatch_cross_ref where werks = ''.
ENDFORM. " modify_table
*& Form select_data
Deleting the duplicate records
FORM select_data.
select werks
cmatnr
srlno from zbatch_cross_ref
into table t_zbatch for all entries in t_final
where werks = t_final-werks
and cmatnr = t_final-cmatnr
and srlno = t_final-srlno.
sort t_zbatch by werks cmatnr srlno.
loop at t_zbatch.
read table t_final with key werks = t_zbatch-werks
cmatnr = t_zbatch-cmatnr
srlno = t_zbatch-srlno.
if sy-subrc eq 0.
delete table t_final .
endif.
clear: t_zbatch,
t_final.
endloop.
ENDFORM. " select_data -
Help! How to read data from an Excel file?
Hi,
I need to read data from an Excel file that may contain more then one table in a sheet. How can I read them?
I would be eternally grateful to anyone who can give me any information.Did you try POI from Apache?
http://jakarta.apache.org/poi/index.html -
How do I read my wave form data back from an LVM file?
I collected a waveform and saved it using the LVM file format. I would like to read the waveform back into labview and display it with its timestamp and assigned name. The only way I could read the data back into Labview was to convert it to a number array. I figured if you could write a waveform and save all its data, you should be able to read it back rather easily. I've included my LVM file and two simple programs. The program I'm using is much larger, but these two programs are representative of what I'm trying to accomplish.
Thanks
Solved!
Go to Solution.
Attachments:
Write To LVM.vi 96 KB
Read From LVM.vi 67 KB
Test Data_08-12-11_1252.txt 29 KBHi Knoebel,
To display the waveform data, you'll need to change a couple things.
1. Open the "Convert from Dynamic Data" vi and change the Conversion to have a resulting data type of 1D array of waveform, as this is the datatype you are writing with the "Write To LVM.vi" Currently you are converting to an array of scalars here, which is why you are losing timestamp data.
2. Open the "Read from Measurement File" express VI and Change the Time Stamps to be Absolute (date and time) rather than relative.
3. If you want to display the timestamp on the waveform graph, pull up the properties window for the Waveform graph and change the Display Format to be Absolute Time for the X-axis and then check the Scales tab to be sure you have unchecked Ignore waveform timestamp on x-axes
After making the change to convert from dynamic data type to 1D array of waveform you can also probe the wire going into the waveform graph to check the t0 and dt values of the waveform as you read from file.
Lastly, if you look at the Write to LVM.vi block diagram, you will see a little red coercion dot between the waveform data wire and the Write to Measurement File data input terminal. It would be better to use the "Convert to Dynamic Data" express VI to make this conversion.
Hope this helps!
Sherrie -
Reading long text from excel file to an internal table
Hi
Can any body tell me how to read long text from excel file to an internal table.
When i am using this FM KCD_EXCEL_OLE_TO_INT_CONVERT then it is reading only 32 characters from each cell.
But in my excel sheet in one of the cell has very long text which i need to upload into a internal table.
may i know which FM or what logic i need to use for this problem.
RegardsHi,
Here is an example program. It will upload an Excel file with two columns. You could also assign the Excel structure dynamically, but I wanted to keep the example simple. The main point is that the internal table (it_excel in this example) must match the Excel structure that you want to convert.
Remember, this is just an example to help you figure out how to properly use the technique. It will certainly need to be modified to fit your requirements, and as always there may be a better way to get the Excel converted... this is just one possibility that has worked for me in the past.
*& Report zexcel_upload_test *
REPORT zexcel_upload_test.
TYPE-POOLS: truxs.
TYPES: BEGIN OF ty_excel,
col_a(10) TYPE n,
col_b(35) TYPE c,
END OF ty_excel.
DATA: l_data_tab TYPE TABLE OF string,
l_text_data TYPE truxs_t_text_data,
l_gui_filename TYPE string,
it_excel TYPE TABLE OF ty_excel.
FIELD-SYMBOLS: <wa_excel> TYPE ty_excel.
PARAMETERS: p_file TYPE rlgrap-filename.
* Pass the file name in the correct format
l_gui_filename = p_file.
* Upload data from PC
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_gui_filename
filetype = 'ASC'
has_field_separator = 'X'
CHANGING
data_tab = l_data_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
* MESSAGE ...
EXIT.
ENDIF.
* Convert from Excel into the appropriate itab
l_text_data[] = l_data_tab[].
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = l_text_data
i_filename = p_file
TABLES
i_tab_converted_data = it_excel
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ...
EXIT.
ENDIF.
LOOP AT it_excel ASSIGNING <wa_excel>.
* Do something here...
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM filename_get CHANGING p_file.
* FORM filename_get *
FORM filename_get CHANGING p_in_file TYPE rlgrap-filename.
DATA: l_in_file TYPE string,
l_filetab TYPE filetable,
wa_filetab TYPE LINE OF filetable,
l_rc TYPE i,
l_action TYPE i,
l_init_dir TYPE string.
* Set the initial directory to whatever you want it to be
l_init_dir = 'C:\'.
* Call the file open dialog without multiselect
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Load file'
default_extension = '.XLS'
default_filename = l_in_file
initial_directory = l_init_dir
multiselection = 'X'
CHANGING
file_table = l_filetab
rc = l_rc
user_action = l_action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
REFRESH l_filetab.
ENDIF.
* Read the selected filename
READ TABLE l_filetab INTO wa_filetab INDEX 1.
IF sy-subrc = 0.
p_in_file = wa_filetab-filename.
ENDIF.
ENDFORM. " filename_get
Regards,
Jamie
Maybe you are looking for
-
The original Weather icon on home screen disappeared. I can get the app itself from the search screen but I think the icon deleted somehow. How can I get it back?
-
is it worthwhile to buy one of those transparent anti-stain/scratch stick-on plastic cover for protection of the exterior of the macbook? pls recommend any brand/model that is value for money. thanks.
-
My device keeps receiving multiple sms from one specific number.
I have an Iphone 4, my device keeps receiving multiple sms from my customer in Germany. I am in India. Although he just sends it once, I keep receiving them for days. Sometimes to the tune of 600 smses a day, even night. I have to turn off my sms not
-
How do I set the length of each clip?
I have just begun trying to build a video with Premiere Elements 10 I have created many videos with Windows Movie Maker..found it boring for Effects etc.that's why I have this new software. Now my question is ..How do I set the time for each clip? I
-
Backgrounds don't show in pages from template
I made a template with backgrounds being controled by an external CSS file; but when I make a page from the template, the bgs don't show; anyone have an idea why? the panel on the right sidebar is supposed to have a drop shadow gif repeating on the y