Time from .xls file is divided
Hello I,m new with LabVIEW 10 and i have a problem with reading time from .xls file with the read excel values.vi.
In excel the time format is 00:00:20 but in LabVIEW (with Strings) i get (i think) a divided result 0,000231481481481481 for 00:00:20 and so on.
00:00:15
00:00:20
00:00:17
00:00:20
00:00:08
00:00:20
00:00:09
I would like to get the same format in the .vi as it is in .xls file.
Picture added.
Could you please helpe me with this...
Attachments:
String problem.JPG 36 KB
That VI returns the value of the cell, not the formatted string. The issue with time values between Excel and LabVIEW has been brought up numerous times before. Excel does not use the same datetime starting point as LabVIEW. See, for example, this discussion: http://forums.ni.com/t5/LabVIEW/Read-custom-excel-time-data-in-LabView/m-p/775359
Similar Messages
-
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
Hello there guys,
i'm making a game and therefor i need to read a gif file like 20 times.
i don't want my program to read the gif each time from the file, but only once.
so i load it into an image or something?
cuz opening the gif 20 times from my hard disk is a lot of time loss....
opening it once and store it is much more efficient
thx in advance
plz help me out, cuz i don't really know how to do it.
(in Delphi it's easy, but Java......)
greetz,
SpeciesXX
Ramon Ribbeyes, it works, i used this code, thx man
void button1_ActionPerformed(java.awt.event.ActionEvent event)
ImageIcon image = new ImageIcon("f:/a.gif");
JLabel label = new JLabel();
label.setIcon(image);
this.getContentPane().add(label);
label.setBounds(10,10,100,100);
and there i see my image :-)
but 1 more thing, should i display all those blocks (images) on an applet, or should i use something else? (like what??)
a sort of frame?
because later on i have the field where all the blocks are in, and i have an area surrounding it, displaying all kinda information about the game, like how many lives remaining....
can i put 2 applets in eachother? like applet1 is the parent of applet2?
or should i use something else?
plz help me, cuz java is kinda new to me i see....
in delphi i just used 2 forms, form 1 with the blocks, form2 with the rest of info, and also being the parent of form1
thx again, soon i can help ya guys too, i hope..
(im learning java at school, but way too slow and to ez)
Ramon -
BAPI - DATA TRANSFER FROM .XLS FILE TO DB TABLE
I am upload data from xls file to database table.
first i have load xls file data to internal table (it_data) that is working.
then from internal table to database table (zskv_rate) by function module (ZBAPI_RATE_SAVEDATA) which is not working.
ex.
LOOP AT IT_DATA.
Header
ZSKV_RATE-DIVN = IT_DATA-DIVN.
ZSKV_RATE-REGN = IT_DATA-REGN.
ZSKV_RATE-PLANT = IT_DATA-PLANT.
ZSKV_RATE-RATE = IT_DATA-RATE.
APPEND IT_DATA.
CALL FUNCTION 'ZBAPI_RATE_SAVEDATA'
EXPORTING
HEADDATA = ZSKV_RATE
IMPORTING
RETURN = BAPI_RETURN
TABLES
DATA = IT_DATA
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-DIVN.
ELSEIF BAPI_RETURN-TYPE = 'S'.
WRITE: 'Successfully created material' ,IT_DATA-DIVN.
ELSE.
WRITE:/ 'NONE' ,IT_DATA-DIVN.
ENDIF.
ENDLOOP.
how to transfer data from internal table to database table.Hi Sanjeev,
as u hv uploaded the excel file into the internal table,
u can update the ztable from internal table..
modify <dbtab>from itab.
regards.
Mdi.Deeba -
Wavefrom graph time from .csv file
Hello everyone. I had this problem something about three weeks ago:
http://forums.ni.com/t5/LabVIEW/Wavefrom-graph-time-from-csv/td-p/2256754
and solved it by changing the delimiter to a comma decimal delimitter with the format %,;%.2f
But this problem occurs again suddenly!.
I have attached the VI and the .csv file as a ZIP format
Best regards
Oesen
Attachments:
Trykmaaling_READ.vi 36 KB
ekstra.zip 1 KBI have deleted "row 0" and the graph is better now, but is still incorrect
Best regards
Oesen -
How to read 16 bits at a time from a file.
Hi everyone:
I have a homework problem that requires me to read from a file 16 bits at a time, which is a signed value. I have tried using the code below:
try {
FileInputStream fis = new FileInputStream(fileName);
DataInputStream dis = new DataInputStream(fis);
System.out.println("Reading "+fileName+"...");
int x,y;
bytes = new int [];
for(y=0;y<height;y++) {
bytes[y] = dis.readByte();
dis.close();
fis.close();
System.out.println("Read "+fileName+" Successfully.");
} // try
catch(Exception e) {
System.err.println(e.getMessage());
System.exit(1);
But this code only reads a byte at a time, I need to read 16 bits at a time. Does anyone have any ideas?
Any help is greatly appreciated.
CeliaDataInputStream has another method that does what you want.
-
Does anyone know a way to extract data from an xls file to load into the database WITHOUT someone having to open it in excel and convert to a csv ?
Here's something that was posted on a previous thread that allows you to set up the excel workbook as an external datasource....
1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
MSACC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
(CONNECT_DATA =
(SID = EXCL)
(HS = OK)
Here SID is the name of data source that you have just created.
3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = <hs_sid>)
(ORACLE_HOME = <oracle home>)
under SID_LIST_LISTENER like:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\ORA9DB)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = ORA9DB)
(ORACLE_HOME = d:\ORA9DB)
(SID_NAME = ORA9DB)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = EXCL)
(ORACLE_HOME = D:\ora9db)
4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
In this file set following two parameters:
HS_FDS_CONNECT_INFO = excl
HS_FDS_TRACE_LEVEL = 0
5- Now connect to Oracle database and create database link with following command:
SQL> CREATE DATABASE LINK excl
2 USING 'excl'
3 /
Database link created.
Now you can perform query against this database like you would for any remote database.
SQL> SELECT table_name FROM all_tables@excl;
TABLE_NAME
DEPT
EMPI've tried it and it works, although your data has to be in a flat(ish) format with the first row on each sheet being the column headings.
;) -
Importing Data From XLS File to SQL Server
Dear All,
I want to import the data from Excel(.xls) file to SQL Server (2008 R2). But due to some problem (may be data), an error is occurring when I am going to import using Import Data Wizard. I want the rows to ignore those are creating issues and to keep track
of those records. That's why I need to process rows one by one. How can I do it? Any idea?
Thanks & Regards,
Anujit Karmakar
Anujit Karmakar Sr. Software EngineerWhats the error? Have you mapped the source-destination data types in column mappings?
Below is a link to video to guide you through the Steps of Import/Export Wizard
SSIS Wizard Video: http://www.youtube.com/watch?v=9Wmdhnx1niU
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other
forum members can benefit from it -
i am acquiring 32 channels thermistor data (temp in degree vs date/time) in waveform plot using array to cluster function ,
now my problem is how to write this data into xls file for all channels continuously.
please help me at the earliest & i am new to Labview.Hi Priyanka,
Writing to excel file continuously is not a good idea, you can use ".CSV" or TDMS file format and once data acquisition is completed you can convert that to excel file using report generation toolkit.
With Regards
Miraz
Kudos is better option to thank somebody on this forum -
Loading 361000 records at a time from csv file
Hi,
One of my collegue loaded 361000 records from one file file , how is this possible as excel accepts 65536 records in one file
and even in the infopackage the following are selected what does this mean
Data Separator ;
Escape Sign "
Separator for Thousands .
Character Used for Decimal Point ,
Pls let me knowhi Maya,
it just possible, other than ms-excel, we have editor like Textpad that support more 65k rows (and windows Notepad), the file may be generated by program or edited outside in excel, or newer version of excel is used, ms-excel 2007 support more 1 million rows.
e.g we have csv file
customer;product;quantity;revenue
a;x;"1.250,25";200
b;y;"5.5";300
data separator ;
- char/delimeter used to separate field, e.g
escape sign, e.g
- "1.250,25";200 then quantity = 1.250,25
separator for thousands = .
- 1.250,25 means one thousand two hundred ...
char used for decimal point
- - 1.250<b>,</b>25
check
http://help.sap.com/saphelp_nw70/helpdata/en/80/1a6581e07211d2acb80000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/c2/678e3bee3c9979e10000000a11402f/frameset.htm
hope this helps. -
Read from xls file and put it in a table
Hi,
I've an xls file while is having 8 cells with some thousands of rows. i've to write a procedure to read that file and put it in a table(each cell as each column). pls help me how to proceed. i'm using oracle 9i
Regards
Abdul Muthalefas Gasparotto said, copy the csv file to the database server.
create a directory object on the database.
create directory dir_temp as 'e:\mydir'
grant read, write on directory dir_Temp to <user>
and then map this csv file to the external table using the below syntax.
CREATE TABLE tab_hierarchy
node_id NUMBER,
parent_id NUMBER,
description VARCHAR2(255)
ORGANIZATIOn EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY dir_temp
ACCESS PARAMETERS
records delimited by newline
fields terminated by ','
(node_id,parent_id,description)
LOCATION ('tree.csv')
PARALLEL
REJECT LIMIT UNLIMITED;in the above code, replace the filename under the LOCATION with your csv file name.
now you should be just able to do select on this table and insert to the other main tbale. -
Uploading data from xls file to internal table
Hello,
I have an excel file with just one column that has phone numbers. I want to upload these phone numbers into an internal table.
Now my question is: What is the method/function to do this? I tried GUI_UPLOAD but after upload the values in the internal table shows lots of # signs instead of the expected phone numbers.
Regards,
Prafful.Hello Prafful,
If you successed to upload XLS into Internal Table and the only problem you have is a # signs try to the following:
1) instead of the XLS file try to use CSV file (it's a TEXT file - C omma S eperated V alues).
2) Check your Encoding (your FILE Encoding should be a same as GUI_UPLOAD encoding)
Good Luck
Eli Steklov -
Filtering Integer from .xls File
Hallo all,
I have an excel data. It contain Integer , String , and Picture (I attached a snapshot of it).
How can I take / filter just the Integer (In Snapshot , it is indicated
with red font), and put it into an array, so i can process it.
Labview just provides functions to read String or Integer from a file.
Any Suggestion would be helpful.
Thanks in advance
Jason
Attachments:
Excel_data.jpg 232 KBHi Jason,
please have a look at the following example:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F2A5979F588B6643E0340003BA230ECF&p_...
regards
timo -
Exporting specific columns from XLS file to a new XLS or XLSX file using powershell
The scenario is that i have a file that our server is constantly dumping data to on a daily basis and out of all the data i only need 2 columns. I need to be a able to automate this because i need to generate a monthly report based on those two columns.
That being said, i need to be able to extract two full columns from datafile1.xls to newdatafile.xlsx. If it would be easier if the original file is CSV i can easily save the data in CSV format instead of XLS.
Thanks in advance.I see, im having a hard time executing the script, i keep getting the following error:
'""Microsoft.Jet.OLEDB.4.0"
has not been registered.";'
and
when i try to run it like this i dont get any errors BUT nothing happens:
C:\Windows\syswow64\rundll32.exe "C:\Program Files\Common Files\System\Ole DB\oledb32.dll",c:\temp\t.ps1
This is the code, which to tell you the truth im not really that familiar with :\
$strFileName = "C:\temp\original\styles.xls"
$strSheetName = 'STYLES$'
$strProvider = "Provider=Microsoft.Jet.OLEDB.4.0"
$strDataSource = "Data Source = $strFileName"
$strExtend = "Extended Properties=Excel 8.0"
$strQuery = "Select STYLE CODE , LAST UPDATE from [$strSheetName]"
$objConn = New-Object System.Data.OleDb.OleDbConnection("$strProvider;$strDataSource;$strExtend")
$sqlCommand = New-Object System.Data.OleDb.OleDbCommand($strQuery)
$sqlCommand.Connection = $objConn
$objConn.open()
$DataReader = $sqlCommand.ExecuteReader()
While($DataReader.read())
$ComputerName = $DataReader[0].Tostring()
"Querying $computerName ..."
Get-WmiObject -Class Win32_Bios -computername $ComputerName
$dataReader.close()
$objConn.close()
For both PowerShell or VBScript you are missing the libraries. You need to download and install the ACE drivers.
Search for ACE drivers.
¯\_(ツ)_/¯ -
SEEKING: Simple searchable content or database from XLS file
I have a client I am creating a site for on BC (eMarketing Plan) who has a simple xls/asp driven database. They do not wish to upgrade to eCommerce - too much of a price jump for the WebApp feature.
Basically, it would be a searchable list with roughly three categories. I thought of a custom search, but it would be a bugger to create a page for each entry.
Is there a simple solution that could be used within the eMarketing plan to do what I am in need of? Something that might bring in the xls information and have it be searchable with a result?First thing to remember is that if you host the CSV file anyone could potentially download the entire thing so you'll have to make sure there are no privacy issues with that.
You'll need something like this Papa Parse - Powerful CSV Parser for JavaScript it will load the CSV into something that is *more easily* searchable with JavaScript. Keeping costs down I would assume your search would be a "from start to finish" type as you could have mulitple records, and sorting will start to get expensive so you might want to order the CSV initally by date or name or something like that.
There are with liquid other ways to do this with BC and JSON but I think the above solution might be easier to implement if you just want an export -> upload type of system.
Info on sorting: Sorting algorithm - Wikipedia, the free encyclopedia
Maybe you are looking for
-
Problem with multiple group functions
Hello Everyone... I have a huge problem with trying to create a report. Here is the situation: 1. I have a database that registers certain events for units. Each event is stored in a separate register. 2. There is a specific code that the units have
-
How to install from USB with BootCamp on Snow Leopard
Hello I'm trying to get my bootcamp to recognize windows 7 from a bootable USB. I've already created the windows partition in bootcamp assistant. When I'm in the assistant I'm not getting the option for USB installation. System Version: Mac
-
My iPhone 4 has broken screen, how can I reset it with iTunes
My iPhone 4 has a broken screen. The lock button sometimes works. I need to reset it, can I do this with iTunes. Also, how can you get onto the screen that shows you what phone is connected
-
Query to View all datbases in oracle 10g
How to view all databases all databases in a system. I am using oracle 10g . i created 4 databases . when created with dbca i am able to see databases in /etc/oratab. but not able to see when created manually .
-
SQL 2000 SMTP works from outlook, fails from SQL
We have an older SQL2000 server running on Windows 2003 that we can't get rid of yet or upgrade to a newer version of SQL due to legacy software. It will hopefully be gone in the next 12 months or so but it needs to keep running for now. It has bee