Excel data error ?
hi friends.What did ı do a error?
ı wrote this code.
DATA meta_xl_itab TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
DATA: lv_filename LIKE rlgrap-filename.
lv_filename = p_file.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lv_filename
i_begin_col = '1'
i_begin_row = '1'
i_end_col = '200'
i_end_row = '5000'
TABLES
intern = meta_xl_itab.
data : i_contents TYPE SOI_GENERIC_TABLE WITH HEADER LINE.
loop at meta_xl_itab.
MOVE-CORRESPONDING meta_xl_itab to i_contents.
APPEND i_contents.
ENDLOOP.
CALL FUNCTION 'EECRM_GET_EXCELDATA_INTO_STRUC'
EXPORTING
X_EXCELDATA = i_contents
CHANGING
XY_STRUCTURE = i_contents
this error = "Type confilict when calling a functon module".
what do ı do?
thanks.
hi,
try to use this code......
no need use the function module to convert the data......
DATA : L_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
DATA : L_INDEX TYPE I.
PARAMETERS : STARTCOL TYPE I ,
STARTROW TYPE I ,
ENDCOL TYPE I ,
ENDROW TYPE I .
PARAMETERS: p_flnam LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = sy-repid
FIELD_NAME = ' '
IMPORTING
file_name = p_flnam .
MOVE p_flnam TO lv_filename.
Uploading the flat file from the desktop
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = LV_FILENAME
I_BEGIN_COL = STARTCOL
I_BEGIN_ROW = STARTROW
I_END_COL = ENDCOL
I_END_ROW = ENDROW
TABLES
INTERN = L_INTERN
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT L_INTERN BY ROW COL.
LOOP AT L_INTERN.
MOVE L_INTERN-COL TO L_INDEX.
ASSIGN COMPONENT L_INDEX OF STRUCTURE ITAB TO <FS>.
MOVE L_INTERN-VALUE TO <FS>.
AT END OF ROW.
APPEND ITAB.
CLEAR ITAB.
ENDAT.
ENDLOOP.
Similar Messages
-
How to join the Rule ID to the Error Excel data table.
I have a requirement to get the invalid active rule ID from the rule table for the interface errors
Interface has the logic to log an error, if more than 1 rule found for same combination of product, location and carrier.
The error log is monitored by business users and they would like to see invalid rule on the error report, so they can go and correct those.
This is my Input:
Error Table is in SQL database, we do the Excel data query and send the below table information to users.
ID
Source
Product
Location
Carrier
Date
Error Msg
1
VMI
EX_0
EX_A
EX_ABC
Jan-15
More than 1 Active Rule found for this combination
2
VMI
EX_1
EX_B
EX_XYZ
Jan-15
More than 1 Active Role found for this combination
End User Expecting Output like this, invalid Rule to be added on the error report.
ID
Source
Product
Location
Carrier
Date
Error Msg
Invalid ID
1
VMI
EX_0
EX_A
EX_ABC
Jan-15
More than 1 Active Role found for this combination
1
2
VMI
EX_1
EX_B
EX_XYZ
Jan-15
More than 1 Active Role found for this combination
3
I need to look 2 different tables to get invalid rule ID for the same product, location and carrier combination.
Cross –Reference table (this table has the corresponding internal ID’s for the external value from the error table) source is the common field in error table and the cross reference table.
ID
Source
External Value
Internal Value
Internal ID
1
VMI
EX_0
IN_Pen
001
2
VMI
EX_1
IN_Pencil
002
3
VMI
EX_A
IN_NJ
101
4
VMI
EX_B
IN_CA
102
5
VMI
EX_ABC
IN_PILOT
201
6
VMI
EX_XYZ
IN_LITER
202
After getting all the required Internal ID, I am executing below query to find out invalid rule.
SELECT ID
FROM dbo.Rule r
WHERE r.Status='Active'
AND r.productID= 001
AND r.LocationID=
101
AND r.CarrierID=
201
AND
‘Jan-15’ NOT between From_Date and To_Date
Result:
ID
1
Rule Table
ID
Product ID
Location ID
Carrier ID
Status
From Date
To Date
1
001
101
201
Active
Jan 14
Dec 14
2
001
101
201
Active
Jan 15
Dec 15
3
002
102
202
Active
Jan 14
Dec 14
4
002
102
202
Active
Jan 15
Dec 15
Currently I am running these query’s manually to find the out the rule id and informing to users to correct them.
Please let me know if this is not clear.Hi ManuGT,
i couldn't get you. As the following, the invalid rule is 1,3. but as your description and there should be two internal value IN_NJ and IN_CA, and the invalid rule should be 1,2,3,4 in the rule table. you want to get the invalid Rule id, but why do you want
to return the count? could you please explain clearly??
ID
Source
Product
Location
Carrier
Date
Error Msg
Invalid Rule
1
VMI
EX_0
EX_A
EX_ABC
Jan-15
More than 1 Active Role found for this combination
1
2
VMI
EX_1
EX_B
EX_XYZ
Jan-15
More than 1 Active Role found for this combination
3 -
Error with excel data mining and windows 8.1
Hi I found this thread online which is exactly the same issue I am having. Has this problem been resolved?
"I installed SQL Server 2012 SP1 Data Mining add-in for Excel 2013 64 bit on Windows 8.1 64 bit Enterprise. I then ran "Getting Started" to complete the add-in setup and connect to the SSAS DB. After I opened the "Sample
Excel Data" file to test I noticed the "Table Analysis" tab under "TABLE TOOLS" appeared on the ribbon blank (without the text "ANALYZE" on the tab). When I clicked on that tab I was able to see the "Table Analysis Tools"
buttons but I keep getting the "Object reference not set to an instance of an object" error message when I try to run any one of them and exiting out of Excel disables the data mining add-in. Is this a known issue and if yes is there a
hotfix available? Thank you."
I've also download the follwing hotfix which hasn't helped
http://hotfixv4.microsoft.com/SQL%20Server%202012/sp1/SQLServer2012_SP1_CU7_2894115_11_0_3393_/11.0.3393.0/free/470544_intl_x64_zip.exe
Any assistance would be appreciated!
ConcatchHi Concatch,
Which edition of Excel 2013 are you using? The supported editions of Office supported by the SQL Server 2012 SP1 Data Mining Add-ins for Microsoft Office are as follows:
Professional
Professional Plus
Ultimate
Enterprise
Besides, make sure the cube is hosted in a SSAS 2012 instance.
Regards,
Mike Yin
TechNet Community Support -
POI HSSF Excel 2002 Data error
Hello,
I'm using HSSF 3.0.2 Final version to create an excel document from java.
This document contains pictures and some text under each picture in a row below. There are four sheets in the workbook and each contains about 30-40 pictures.
I can create document fine and I can open it with Excel 2000,
but when I try to open it with Excel 2002 and gives me data error.
My understanding is that 2002 is supported and it seems to be a simple enough document without any fancy features
Any idea what could be wrong?You can post your error and excel file to poi's mailing list.
http://poi.apache.org/mailinglists.html -
Scheduled Report: Export to Excel (Data Only) Fails
I have an issue with a new installation of Crystal Reports Server 2008. When I try to schedule a report for extract to Excel (Data Only) the report fails with the following error:
Error in File ~tmp202064233ce6330.rpt: Operation not yet implemented.
We have scheduled the report using Word, PDF, text and they all work however the Excel (Data Only) format fails everytime with this error.
I have no problem opening the report in Crystal Reports 2008 and Exporting to Excel Data Only format manually.
Thanks in advance!
LeeHi,
i just saw a note about the same Problem for BOE XI Rel.2. There it is a Bug.
I would recommend you install the latest SP for your CRS and try again.
Regards
-Seb. -
Excel ActiveX error in exe: library not registered
Hi,
I wondered if any of you can help me as I'm at a bit of a
loss. I have an application that is complied to exe, and installed with
an installer in LabVIEW 8.5.1 that uses the Excel ActiveX interface to
write to an xls file. In development and on all of my testing this
seems to work fine (with Excel 03 and 07) but I have just received a
bug report whereby on a particular install the following error has been
thrown form my Open Excel VI (see attached code). Apparently it was
working but this machine has recently upgraded some data management
software (Goldmine 6.0 -> 7.5) and since then it hasn't worked. The error generated is:
Error code:-2147319779
source: "Library not registered."
Troubleshooting
is complicated a little as this is running as an exe and the source
code seems to work fine on my development machine.
Any ideas would be GREATLY appriciated!
(my current inclination is to ask the customer to resintall Office and
Goldmine and then reinstall the LabVIEW app - so far he has only tried
reinstalling the LabVIEW software)
Shaun
(this message is also posted on Lavag.org = http://forums.lavag.org/Excel-ActiveX-error-in-exe-library-not-registered-t11912.html)
Attachments:
Open Excel.vi.png 52 KBIt would really help to see the relevant code, and to know which version of LabVIEW is being used. I notice the original code was developed on LabVIEW 8.5, and the Poster mentions older versions of Office (and is writing an .xls instead of an .xlsx file), suggesting the original code is about 7 years old.
About 4 years ago, I got frustrated with trying to use ActiveX, and NI developed a much more robust Report Generation Toolkit. I've adopted the RGT and haven't looked back. Most of the weird errors I used to fight are gone, and building executables is (mostly) no pain (there's a small glitch that required manual OK-type intervention when you first encounter the Toolkit in a Build). I'm guessing that it should be pretty easy to rewrite your code using the RGT in place of ActiveX, and I'm willing to help ...
Bob Schor -
The connection string for coded UI Data driven test using excel data source is not working
Hello,
I am using the visual studio 2012 coded UI test, i added the following connection strings to connect to an excel data source:
[DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true",
"Sheet1$", DataAccessMethod.Sequential), TestMethod]
[DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\Automation data file.xls;defaultdir=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;driverid=1046;maxbuffersize=2048;pagetimeout=5",
"Sheet1$", DataAccessMethod.Sequential), TestMethod]
But i get the following error:
"The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
Error details: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
Thanks,
ShazaThanks for Adrian's help.
Hi shaza,
From the error message, I suggest you can refer the Adrian's suggestion to check the date source connection string correctly.
In addition, you can refer the following about how to Create a Data-Driven Coded UI Test to check your issue:
http://msdn.microsoft.com/en-us/library/ee624082.aspx
Or you can also try to use a Configuration File to Define a Data Source for coded UI test.
For example:
<?xml
version="1.0"
encoding="utf-8"
?>
<configuration>
<configSections>
<section
name="microsoft.visualstudio.testtools"
type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection,
Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</configSections>
<connectionStrings>
<add
name="ExcelConn"
connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\add.xlsx;defaultdir=.;
driverid=790; maxbuffersize=2048; pagetimeout=60;"
providerName="System.Data.Odbc"/>
<add
name="ExcelConn1"
connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\sum.xlsx;defaultdir=.;
driverid=790;maxbuffersize=2048;pagetimeout=60"
providerName="System.Data.Odbc"/>
</connectionStrings>
<microsoft.visualstudio.testtools>
<dataSources>
<add
name="ExcelDS_Addition"
connectionString="ExcelConn"
dataTableName="Addition$"
dataAccessMethod="Sequential"/>
<add
name="ExcelDS_Multiply"
connectionString="ExcelConn1"
dataTableName="Multiply$"
dataAccessMethod="Sequential"/>
</dataSources>
</microsoft.visualstudio.testtools>
</configuration>
For more information, please see:https://msdn.microsoft.com/en-us/library/ms243192.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Importing Data into Sql Server 2012 from Excel Data
Hi,
I got errors like this when i am doing import data into sql server from excel Data. Can you please help us?
- Executing (Error)
Messages
Error 0xc020901c: Data Flow Task 1: There was an error with Source - demotable$.Outputs[Excel Source Output].Columns[Comment] on Source - demotable$.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one
or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)
Error 0xc020902a: Data Flow Task 1: The "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]" failed because truncation occurred, and the truncation row disposition on "Source - demotable$.Outputs[Excel Source Output].Columns[Comment]"
specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - demotable$ returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput().
The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)Are you attempting to import into a newly made table or into an existing table? It looks like it's trying to insert data where it cannot be inserted (invalid column or lack of data size in your column).
Try the following:
1). In your excel sheet, highlight the whole sheet and make sure the cells are in 'text' form and try re-importing
2). save the document as ms dos TEXT and import as a text document.
3). double check your columns are correct for the data, for example if you have a column that has a string of 100 characters and your column is 'NvarChar(90)' - that might cause the error? Or just correct data type in your column
3). If that doesn't work and you're inserting into a new table, try importing it as string first and writing a query to insert columns that should be float/integer or whatever. You may want to convert float texts to a 'bigint' first rather than string
> float as that can cause problems if I remember correctly. -
Reading Excel data through java servlets
I am doing a project in jsp and servlet. During the project i have to read some excel data from the excel sheet and store them to DB2 database. While reading from the data from the excel sheet a problem occurred. I have used the poi package to read the data from the excel sheet and the code is correct and it reads the excel sheet. Now i just displayed the number of rows and cells in the excel sheet and while displaying the value of the every cell, the servlet displays only the address of each cell instead of displaying the value. Here i am attaching the code that i have used and the output of the servlet.
One more thing that i have noticed here is i just wrote a simple java program to read the excel data using the same steps that used earlier in the servlet. In this case the program displays the actual value of the excel cell.
Could you please help me to solve the problem.
try
String fileName = req.getParameter("file1");
String filePath = "C:
Program Files
Apache Software Foundation
Tomcat6.0
webapps
kbsearch
WEB-INF
Excel Fles
"+fileName;
poifs = new POIFSFileSystem(new FileInputStream(filePath));
book = new HSSFWorkbook(poifs);
sheet = book.getSheetAt(0);
int totalRow = sheet.getLastRowNum();
out.print("Total Number of Rows: "+totalRow);
for(int i=2; i<=totalRow; i++)
row = sheet.getRow(i);
int totalColumn = row.getLastCellNum();
out.print("<br>Total Cell: "+totalColumn);
for(int j=0; j<=totalColumn; j++)
cell = row.getCell((short)j);
out.print("<br>Cell Value: "+cell);
catch(Exception e)
out.println("
Error: "+e.getMessage());
OUTPUT
Total Number of Rows: 9
Total Cell: 9
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1450f1f
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@e3f02a
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@ac622a
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@160c21a
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1677737
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1c3dc66
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1babddb
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1069693
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@187b360
Cell Value: org.apache.poi.hssf.usermodel.HSSFCell@1172c5My copy of POI came with documentation including the Javadocs part:
org.apache.poi.hssf.usermodel.HSSFCell
double getNumericCellValue()
get the value of the cell as a number. For strings we throw an exception. For blank cells we return a 0.
public java.lang.String getStringCellValue()
get the value of the cell as a string - for numeric cells we throw an exception.
For blank cells we return an empty string.
For formulaCells that are not string Formulas, we return empty String
*/ -
hi,everybody!
I need to create a plug-in that will use excel data.
But I don't know how to access to excel from the frameMaker plug-in.
Can someone give me any idea?
regard.
erieru103Yes, having multiple languages and fonts in the file could be a cause for having a filter problem. I don't know whether having macros would cause problems, I would guess probably not as I think the filter would just ignore them.
For more troubleshooting, I would suggest starting by making simplified copies of the Excel file, starting with having just a single language in the Excel file (one with Russian, one with Chinese, and so on), to see if you can narrow the problem down to any particular language or font.
In addition, I would look at any special formatting in the file, for example are there columns or rows that have spanned cells or columns, or rows that are divided in some special way, because Excel can format cells in ways that FrameMaker cannot handle, so that could cause the filter to make an error.
And, another possible way to proceed would be to have the Excel file open, copy a few cells to the Windows clipboard, then paste them into FrameMaker. If the cells correctly appear in FrameMaker with the font correctly maintained and the language characteristics are preserved, then that might indicate that the filter is having a problem with the Excel version or with some special formatting in the file, not with the language and font.
SHeila -
Importing excel data into oracle tables
Hello gurus,
Importing excel data into oracle tables..
I know this is the most common question on the thread ...First, i searched the forum, i found bunch of threads with loading data using sqlloader, converting excel into .Txt, tab delimited file, .csv file etc....
Finally i was totally confused in terms how to get this done....
Here is wat i have
- Excel file on local computer.
- i have laod data into dev environment tables(So no risk involved, but want to try something simple)
- Oracle version 11.1.0.7
- Sqlplus and toad (editors)
Here is wat i like to do ....i dont know if its possible
- Without going to unix server can i do everthing on local system by making use of oracle db and sqlplus or toad
SQLLOADER might be one option...but i dont want to go the unix server for placing files and logs and stuff.
Wat will be best and simplest option to do?? and wat format will best to convert from excel into csv, or txt or tab delimited etc.....
If you suggest sqlloader, any code example will be greatly appriciated.
Thank you so much!!!Hi,
user642297 wrote:
Imran,
This is increadible option in toad!!! It works absolutely sweet!! I have toad 9.7 version. IT works great. Thank you so much!!You are welcome :)
Well i have further discussion on this ....this option is great if you doing in staging or development area. What if your doing in prod?? If you automating the sqlloader then how do u do it?? I think we still need to stick with traditional approach of laoding data by making use of SQLLoader right ?? If m wrong please correct me.well, in our case, we do have access to a custom schema in prod where we create the staging table and load the data from datafiles.
try this:
load data
infile 'C:\dest.csv'
into table dest_table
fields terminated by "~" optionally enclosed by '"'
TRAILING NULLCOLS
(name,
owner_nm,
description_column,
UPDT_DT DATE 'MM/DD/YYYY')
{code}
you can get more info about sql loader and your error here:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm
http://www.allinterview.com/showanswers/53766.html
And one more quick question ...i found an example of control file , in that i see .dat format file. Is it a data file ?? can i try that option ?? But in excel i didnt see to convert the .dat format file.
Any thoughts ???
It is same as a delimiter text file.
steps to create a .dat file (from a excel file):
1. Insert a column between two columns and populate it with the delimiter (in our case, it is ~)
2. Save the file as unicode text.
3. Open the file in text editor and remove all the tabs (find an replace with blank)
4. Save the file as "DEST.dat". Select encoding as UTF-8 while saving.
5. Your .dat file is ready.
Regards
Imran
Edited by: Imran Soudagar on Apr 22, 2010 10:22 PM -
Sharepoint 2010 Excel Calclation Error
Hi,
i am using Sharepoint 2010 in Form Environment. getting below error when we call the Excel workbook in browser randomly. We have use package called xldisplay to view single sheet in browser. Excel View in browser workgin fine.
Any suggestion.
Error Message from Parse Excel: Some error while processing! at Microsoft.Office.Excel.Server.WebServices.ApiShared.ExecuteServerSessionMethod(Boolean hasSessionId, String sessionId, CoreServerSessionMethod coreWebMethod, String name) at Microsoft.Office.Excel.Server.WebServices.ExcelService.GetRange(String
sessionId, String sheetName, RangeCoordinates rangeCoordinates, Boolean formatted, Status[]& status) at ExcelDisplay.Layouts.xldisplay.ParseExcel(SPWeb _spWeb, String _strWorkBookPath, String _strSheetName, Nullable`1 _blnIsAdminMode)Hi,
file>Properties.... which IE security zone does the page map to?
f12>Console tab, refresh the page to show suppressed error messages.
(Include any error messages with your questions). The console will list any blocked content and scripting errors.
f12>Networking tab, click the start button. refresh the page to view the request and responses.
check
Tools>Internet Options>Security tab, click "Reset all zones to default".
Tools>ActiveX Filtering (is it turned off for the site?)
Tools>Manage addons>Show all addons>locate the MSOffice plugin.
Name: Microsoft Excel Worksheet
Publisher: Microsoft Corporation
Type: ActiveX Control
Architecture: 32-bit
Version: 14.0.7145.5001
File date: Wednesday, 18 February 2015, 12:22 AM
Date last accessed: Monday, 9 March 2015, 7:46 PM
Class ID: {00020830-0000-0000-C000-000000000046}
Use count: 430
Block count: 40
File: EXCEL.EXE
Folder: C:\Program Files (x86)\Microsoft Office\Office14
Note: it is only available to 32bit IE tabs....
Questions about html, css and scripting for website development. If possible include a link to your website or a mashup.
Rob^_^ -
Import excel data for labview control
I'm having some trouble importing excel data into labview. Goals: Input valve flow rates into excel, use those values to control DAQ, have user balance odor with excel defined flow rate, export balance data to excel. Here is what I have so far. Any help is greatly appreciated.
Attachments:
Intensity.vi 162 KBWhere in the code are you reading from the Excel Spreadsheet? What VIs are you using? What are the problems are you experiencing (errors, unexpected values, etc.)?
There is a Read From Spreadsheet File.vi in LabVIEW. LabVIEW uses ActiveX controls for .xlsx files, so saving the spreadsheet as a CSV file may be better for this VI. Try it out! See what happens.
Here some more info on reading from spreadsheets:
LabVIEW Manual: Read From Spreadsheet File VI
KnowledgeBase article: How Can I Import Spreadsheet Files into LabVIEW using the .csv Format?
Taylor B.
National Instruments -
Need help with Importing These Kinds of Excel Data Sheets
hy there, Can someone Assist me with this.
I got a package in SSIS. where I need to import Excel data sheets.
Those sheets are coming from Cube.
And So their format is bit different
Kindly help me how to import those With DATA FLOW TASK.
And ,
As you can see Excel sheets got Filter on their Columns.
So I am Getting much often Errors in importing those sheets Via DATA FLOW TASK.
Thanks In Advance.
# Note.
I can not Edit each Excel File Before running packages.
Packages are automated.
And also the sheets are automated, they get store in the FTP on a cyclic job.
So Have to Do it on PAckage levelYou cannot hit a moving target, your data quality is at risk, too. Even if a package succeeded there is still a degree of suspect whether the data ended in the right place.
You can create a helper program that checks for data integrity, e.g. a series of SQL queries can be executed against the source to pinpoint what metadata shape the Excel arrived in. Then branch the package flow based on one or the other variant (there will
be only a handful). The branching can be done by using Precedence Constraints. Hey, but see what I say about above.
Arthur My Blog
Okay than I must do it differently. OR get the source in a better and secured manner. -
Using forms 6i, to import excel data to database not a valid month problem
Hi all,
i am fetching data from excel dynamically to oracle table, all data is of general type
here i am passing value V3 varchar2(100) but actual database column field is DATE.
my insert code is given below
[code]
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_vcColumn1 IN VARCHAR2,i_vcColumn2 IN VARCHAR2,i_vcColumn3 IN VARCHAR2,i_vcColumn4 IN VARCHAR2,i_vcColumn5 IN VARCHAR2,i_vcColumn6 IN VARCHAR2,i_vcColumn7 IN VARCHAR2,
i_vcColumn8 IN VARCHAR2,i_vcColumn9 IN VARCHAR2,i_vcColumn10 IN VARCHAR2,i_vcColumn11 IN VARCHAR2,i_vcColumn12 IN VARCHAR2,i_vcColumn13 IN VARCHAR2,i_vcColumn14 IN VARCHAR2,
i_vcColumn15 IN VARCHAR2,i_vcColumn16 IN VARCHAR2,i_vcColumn17 IN VARCHAR2,i_vcColumn18 IN VARCHAR2,i_vcColumn19 IN VARCHAR2,i_vcColumn20 IN VARCHAR2,i_vcColumn21 IN VARCHAR2,
i_vcColumn22 IN VARCHAR2,i_vcColumn23 IN VARCHAR2,i_vcColumn24 IN VARCHAR2,i_vcColumn25 IN VARCHAR2,i_vcColumn26 IN VARCHAR2,i_vcColumn27 IN VARCHAR2,i_vcColumn28 IN VARCHAR2,
i_vcColumn29 IN VARCHAR2,i_vcColumn30 IN VARCHAR2,i_vcColumn31 IN VARCHAR2,i_vcColumn32 IN VARCHAR2,i_vcColumn33 IN VARCHAR2,i_lData IN tDataList) IS
vcInsert VARCHAR2(3500);
i INTEGER:=0;
flag boolean:= FALSE;
BEGIN
i:=i_lData.COUNT;
:BLK_MAIN.T4:= vcInsert;
vcInsert:='INSERT INTO CRM_DELT_IMPORT (';
if length(i_vcColumn1) > 0 then
flag:=TRUE;
vcInsert:=vcInsert||i_vcColumn1;
end if;
if length(i_vcColumn2) > 0 then
IF flag THEN
vcInsert:=vcInsert|| ','||i_vcColumn2;
else
vcInsert:=vcInsert||i_vcColumn2;
end if;
end if;
if length(i_vcColumn3) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn3;
end if;
if length(i_vcColumn4) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn4;
end if;
if length(i_vcColumn5) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn5;
end if;
if length(i_vcColumn6) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn6;
end if;
if length(i_vcColumn7) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn7;
end if;
if length(i_vcColumn8) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn8;
end if;
if length(i_vcColumn9) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn9;
end if;
if length(i_vcColumn10) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn10;
end if;
if length(i_vcColumn11) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn11;
end if;
if length(i_vcColumn12) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn12;
end if;
if length(i_vcColumn13) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn13;
end if;
if length(i_vcColumn14) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn14;
end if;
if length(i_vcColumn15) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn15;
end if;
if length(i_vcColumn16) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn16;
end if;
if length(i_vcColumn17) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn17;
end if;
if length(i_vcColumn18) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn18;
end if;
if length(i_vcColumn19) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn19;
end if;
if length(i_vcColumn20) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn20;
end if;
if length(i_vcColumn21) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn21;
end if;
if length(i_vcColumn22) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn22;
end if;
if length(i_vcColumn23) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn23;
end if;
if length(i_vcColumn24) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn24;
end if;
if length(i_vcColumn25) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn25;
end if;
if length(i_vcColumn26) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn26;
end if;
if length(i_vcColumn27) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn27;
end if;
if length(i_vcColumn28) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn28;
end if;
if length(i_vcColumn29) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn29;
end if;
if length(i_vcColumn30) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn30;
end if;
if length(i_vcColumn31) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn31;
end if;
if length(i_vcColumn32) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn32;
end if;
if length(i_vcColumn33) > 0 then
vcInsert:=vcInsert|| ','||i_vcColumn33;
end if;
vcInsert:=vcInsert||') values(';
if length(i_vcColumn1) > 0 then
vcInsert:=vcInsert||''''||i_ldata(i).V1||'''';
end if;
if length(i_vcColumn2) > 0 then
IF flag THEN
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V2||'''';
else
vcInsert:=vcInsert|| ''''||i_ldata(i).V2||'''';
end if;
end if;
if length(i_vcColumn3) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V3||'''';
--vcInsert:=vcInsert|| ','||''''||to_date(to_date(i_ldata(i).V3,'dd-mon-yy HH12:MI:SS'),'dd-mon-yy HH12:MI:SS')||'''';
-- vcInsert:=vcInsert|| ','||''''|| to_date('i_ldata(i).V3','dd-mon-yy HH12:MI:SS')||''''; --to_date('18-JUN-2013 12:00:00', 'DD-MON-YYYY HH24:MI:SS')
end if;
if length(i_vcColumn4) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V4||'''';
end if;
if length(i_vcColumn5) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V5||'''';
end if;
if length(i_vcColumn6) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V6||'''';
end if;
if length(i_vcColumn7) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V7||'''';
end if;
if length(i_vcColumn8) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V8||'''';
end if;
if length(i_vcColumn9) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V9||'''';
end if;
if length(i_vcColumn10) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V10||'''';
end if;
if length(i_vcColumn11) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V11||'''';
end if;
if length(i_vcColumn12) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V12||'''';
end if;
if length(i_vcColumn13) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V13||'''';
end if;
if length(i_vcColumn14) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V14||'''';
end if;
if length(i_vcColumn15) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V15||'''';
end if;
if length(i_vcColumn16) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V16||'''';
end if;
if length(i_vcColumn17) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V17||'''';
end if;
if length(i_vcColumn18) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V18||'''';
end if;
if length(i_vcColumn19) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V19||'''';
end if;
if length(i_vcColumn20) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V20||'''';
end if;
if length(i_vcColumn21) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V21||'''';
end if;
if length(i_vcColumn22) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V22||'''';
end if;
if length(i_vcColumn23) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V23||'''';
end if;
if length(i_vcColumn24) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V24||'''';
end if;
if length(i_vcColumn25) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V25||'''';
end if;
if length(i_vcColumn26) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V26||'''';
end if;
if length(i_vcColumn27) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V27||'''';
end if;
if length(i_vcColumn28) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V28||'''';
end if;
if length(i_vcColumn29) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V29||'''';
end if;
if length(i_vcColumn30) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V30||'''';
end if;
if length(i_vcColumn31) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V31||'''';
end if;
if length(i_vcColumn32) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V32||'''';
end if;
if length(i_vcColumn33) > 0 then
vcInsert:=vcInsert|| ','||''''||i_ldata(i).V33||'''';
end if;
vcInsert:=vcInsert||')';
FORMS_DDL(vcInsert);
:BLK_MAIN.T4:= vcInsert;
--END LOOP;
STANDARD.COMMIT;
END;
END;
[/code]
How can i pass '13-06-13 05:54:33' to database table.
if i put condition
vcInsert:=vcInsert||','||''''||TO_CHAR('i_ldata(i).V3','DD-MON-RR HH12:MI:SS')||''''
i get the error
to_char many declaration..
if i remove this i got error
ORA-01843: no a valid month
Since i am dynamically importing the excel data, every time the position of the date fild is going to change. For static its ok that i know that V3 is going to be a date.
But for dynamic date may be at position V22 or at any place.
please suggest something.
Regards
Samhii Marwin
Thanks for the reply. Yes i understand what exactly you are saying.
That's why i have created a test table. All fields in the table are of varchar2 type and no constraints were given to the table and import the data to test table.
Once the data is imported to test table, then i am inserting data to my original table i.e CRM_DELT_IMPORT. I have written the following code for that.
But when i press the button i got the error
FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-00001
my CRM_DELT_IMPORT have composit key on ("ROUTE_ID", "DELDATE", "DELSNO", "PROFILE_ID")
I also inserted few records with normal insert on SQL prompt , records gets inserted in to the table.
But when i use the form for insert and click on button of insert i get the error.
I also check that records gets imported in test table but not get inserted into CRM_DELT_IMPORT table (with the help of form. )
(can i use IGNORE_ROW_ON_DUPKEY_INDEX here? and how?)
Please help me in this problem.
Thanks again.
Regards
Sam
My code on when-button-pressed is
DECLARE
CURSOR IMP IS
SELECT ROUTE_ID, to_date(DELDATE,'DD-MM-RR HH24:MI:SS')DELDATE, DELSNO, DEL_BOY,
PROFILE_ID, TRNTYPE, RECNO, EXP_FR, EXP_PA, EXP_SK, EXP_EMPTY, EXP_TIME, ACT_FR,
ACT_PA, ACT_SK, ACT_EMPTY, ACT_TIME, LATITUDE, LONGITUDE, IS_FREE, RATE_LITER, AMT_DEBIT,
DEVICE_ID, PROF_NAME, ADDR1, ADDR2, LANDMARK, PLAN_ID, DEL_MODE, NEW_CHANGE, NO_DEL_CODE,
TO_DATE(DEV_DATE,'DD-MM-RR HH24:MI:SS')DEVICE_DATE, substr(DEV_TIME,12,19)DEVICE_TIME
FROM TEST;
IMP_REC IMP%ROWTYPE;
BEGIN
OPEN IMP;
FETCH IMP INTO IMP_REC;
WHILE IMP%FOUND
LOOP
INSERT INTO CRM_DELT_IMPORT(ROUTE_ID, DELDATE, DELSNO, DEL_BOY, PROFILE_ID, TRNTYPE, RECNO, EXP_FR, EXP_PA, EXP_SK, EXP_EMPTY,
EXP_TIME, ACT_FR, ACT_PA, ACT_SK, ACT_EMPTY, ACT_TIME, LATITUDE, LONGITUDE, IS_FREE, RATE_LITER, AMT_DEBIT,
DEVICE_ID, PROF_NAME, ADDR1, ADDR2, LANDMARK, PLAN_ID, DEL_MODE, NEW_CHANGE, NO_DEL_CODE, DEV_DATE, DEV_TIME)
VALUES(IMP_REC.ROUTE_ID, IMP_REC.DELDATE, IMP_REC.DELSNO, IMP_REC.DEL_BOY, --to_date(DELDATE,'DD-MM-RR HH24:MI:SS')
IMP_REC.PROFILE_ID, IMP_REC.TRNTYPE, IMP_REC.RECNO, IMP_REC.EXP_FR,IMP_REC.EXP_PA,IMP_REC.EXP_SK,IMP_REC.EXP_EMPTY,IMP_REC.EXP_TIME,IMP_REC.ACT_FR,
IMP_REC.ACT_PA,IMP_REC.ACT_SK,IMP_REC.ACT_EMPTY,IMP_REC.ACT_TIME,IMP_REC.LATITUDE,IMP_REC.LONGITUDE,IMP_REC.IS_FREE,IMP_REC.RATE_LITER,IMP_REC.AMT_DEBIT,
IMP_REC.DEVICE_ID,IMP_REC.PROF_NAME,IMP_REC.ADDR1,IMP_REC.ADDR2,IMP_REC.LANDMARK,IMP_REC.PLAN_ID,IMP_REC.DEL_MODE,IMP_REC.NEW_CHANGE,IMP_REC.NO_DEL_CODE,
IMP_REC.DEVICE_DATE,IMP_REC.DEVICE_TIME); ---TO_DATE(DEV_DATE,'DD-MM-RR HH24:MI:SS'), substr(DEV_TIME,12,19)
END LOOP;
COMMIT;
CLOSE IMP;
END;
Maybe you are looking for
-
Plug-ins missing, can open files anyway
I'm using WinXP and CS2(4.0.5). Every time I open a particular doc, I get the following message: "The document uses one or more plug-ins which are not currently available on your system. Do you want to open anyway?" The missing plug-ins are: jpeg fil
-
How can I get a count of records in a DB?
If I want to get a count of the number of records in a table how do I do it?
-
Simple way to connect AEBS to other router for n-profile
Hi There, I have just sign up to local ISP who gave me a modem/router for their fast internet. Internet itself is fine in terms of speed; however their wireless profile from that router is b/g. I got AEBS and I want to connect it their router to get
-
Socket 1366 chipsets - what's coming down the road?
Hi everyone. I'm probably going to build a new rig in about 6 months to a year, and I intend to use the Socket 1366 architecture. However, one thing I have noticed at the moment is the lack of reasonably priced boards for that architecture. In short,
-
Lumia .. The Windows phone
there is nothing Bad with lumia .. I liked it ... the thing is your must provide the basic features ... Like .. you can not attach the saved file via mail .. Or not even send it on whatsapp! Even x2-01 has this feature.. Then why a 10 k phone doesn't