How to make SSIS Read an Excel File?
I’ve been trying for a while now (won’t say how long), to get BIDS to read a very simple Excel file.
I’m talking SIMPLE!! No matter what I don, SSIS keeps throwing an error, and of course it doesn’t say what the error is, so I can’t really debug it.
I’ve tried this at least 20x with flat files, and it works perfect each time.
I’ve done Data Conversions, Sorting, Union All, and several other Transformations; all work perfect.
Trying to used Excel as a data source, is proving to be a mind numbing experience.
Of over 20 different attempts, it hasn’t worked even once.
I can make it as simple as you can possibly imagine, and SSIS, refuses to even perform the first step (I’m not even trying to create a table in SQL Server anymore).
I have the Excel file path (very simple)
I have the Excel version (very simple)
I have the Connection Manager (very simple)
I have the Sheet name (very simple)
All I can do is see a preview of the Excel sheet before the process runs. As soon as I het F5, I get an instant error, for no reason whatsoever, and no debugging options, whatsoever.
Is there some secret trick I need to know about?
I can't show a snap shot, because MSFT won't allow pictures to be loaded now.
I have this from the Output window:
SSIS package "Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC00F9304 at Package, Connection manager "Excel Connection Manager 1": SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.
Error: 0xC020801C at Data Flow Task, Excel Source [114]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager 1" failed with error code 0xC00F9304.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: component "Excel Source" (114) failed validation and returned error code 0xC020801C.
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
SSIS package "Package.dtsx" finished: Failure.
I have this from the Progress window:
some stuff . . . doesn't seem very relevant
[Excel Source [114]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager 1" failed with error code 0xC00F9304. There may be error messages
posted before this with more information on why the AcquireConnection method call failed.
[Connection manager "Excel Connection Manager 1"] Error: SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.
some stuff . . . doesn't seem very relevant
Similar Messages
-
How to make my waveform from excel file perodic in labview graph
Hi guys,
Previously I've made a vi which integrates the excel file, to plot the graph values in labview using the values in the excel file to give the me a better flexibility to decide what waveform i want it to be. Can i know how to actually make the graph periodic, as in the waveform repeats, because currently it can just plot out the waveform accordingly to the values i inserted in the excel. I've attached my vi and aso my csv file together. Thanks guy.
Attachments:
12.csv 1 KB
graph.vi 18 KBSo do you want to read the same values over again?
If that is what you wish to achieve then use waveform chart as opposed to waveform graph. I editted your code slightly so that you can see the different.
I hope this helps!
Mehak D.
Attachments:
graph.vi 18 KB -
Hi Experts,
How to download a READ ONLY excel file to workstation (local Machine).Hi kaleemullah,
Steps to create a BDC program.
1. Create an internal table with fields same as Excel sheet fields.
2. Declare an internal table with BDCDATA table to store the BDC recording.
3. Declare an internal table with BDCMSGCOL to store the error messages after
the execution of the BDC.
4. Write the code using the fun. module ALSM_EXCEL_TO_INTERNAL_TABLE
to upload the data from the excel sheet.
5. loop that internal table and write the Subroutines to fill the internal table
BDCDATA with the recording of a specified Transaction Code.
6. Using Call Transaction execute the BDC recording.
7. Check Sy-subrc = 0 and store the error messages in the internal table.
8. If you want you can pass those error records to a session using the SESSION method.
Here is an example of a BDC program, but this program is from a text file. Change the function module WS_UPLOAD with ALSM_EXCEL_TO_INTERNAL_TABLE
to upload an excel and write the program with your BDC recording. You can do recording using t-code SHDB.
Sample Program:
REPORT ZRAJ_DATASET_XD01 NO STANDARD PAGE HEADING LINE-SIZE 132
LINE-COUNT 60
MESSAGE-ID Z00.
Table/Structure declarations. *
TABLES : KNA1. "Customer master
Constants declarations. *
CONSTANTS : C_MODE VALUE 'N',
C_UPDATE VALUE 'S',
C_X VALUE 'X',
C_SESS TYPE APQI-GROUPID VALUE 'ZCUSTOMER', "Session Name
C_XD01 LIKE TSTC-TCODE VALUE 'XD01'.
Variable declarations. *
DATA : V_FNAME(15) VALUE SPACE, " Name of file to be created
V_FAILREC TYPE I, " No of failed records
V_MSG(255), " Message Text
V_ERRREC TYPE I, " No of failed records
V_LINES TYPE I. " No of records
*-- FLAG DECLARATIONS
DATA : FG_DATA_EXIST VALUE 'X', " Check for data
FG_SESSION_OPEN VALUE ' '. " Check for Session Open
Structures / Internal table declarations *
*-- Structure to hold BDC data
TYPES : BEGIN OF T_BDCTABLE.
INCLUDE STRUCTURE BDCDATA.
TYPES END OF T_BDCTABLE.
*-- Structure to trap BDC messages
TYPES : BEGIN OF T_MSG.
INCLUDE STRUCTURE BDCMSGCOLL.
TYPES : END OF T_MSG.
*-- Structure to trap ERROR messages
TYPES : BEGIN OF T_ERR_MSG,
MESSAGE(255),
END OF T_ERR_MSG.
*--Internal table to store flat file data
DATA:BEGIN OF IT_KNA1 OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
KTOKD LIKE T077D-KTOKD,
NAME1 LIKE KNA1-NAME1,
SORTL LIKE KNA1-SORTL,
ORT01 LIKE KNA1-ORT01,
PSTLZ LIKE KNA1-PSTLZ,
LAND1 LIKE KNA1-LAND1,
SPRAS LIKE KNA1-SPRAS,
LZONE LIKE KNA1-LZONE,
END OF IT_KNA1.
*-- Internal table to hold BDC data
DATA: IT_BDCDATA TYPE STANDARD TABLE OF T_BDCTABLE WITH HEADER LINE,
*-- Internal Table to store ALL messages
IT_MSG TYPE STANDARD TABLE OF T_MSG WITH HEADER LINE,
*-- Internal Table to store error messages
IT_ERR_MSG TYPE STANDARD TABLE OF T_ERR_MSG WITH HEADER LINE.
Selection Screen. *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_FLNAME(15) OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R_LIST RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003.
PARAMETERS : R_SESS RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 30(20) TEXT-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
Event:Initialization *
INITIALIZATION.
AT Selection Screen. *
AT SELECTION-SCREEN.
Event: Start-of-Selection *
START-OF-SELECTION.
V_FNAME = P_FLNAME.
PERFORM GET_DATA.
PERFORM GENERATE_DATASET.
Event: End-of-Selection *
END-OF-SELECTION.
IF FG_DATA_EXIST = ' '.
MESSAGE I010 WITH TEXT-009.
EXIT.
ENDIF.
PERFORM GENERATE_BDCDATA.
PERFORM DISPLAY_ERR_RECS.
Event: top-of-page
TOP-OF-PAGE.
FORM DEFINITIONS *
*& Form get_data
Subroutine to get the data from mard
--> p1 text
<-- p2 text
FORM GET_DATA.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'C:\XD01.TXT'
FILETYPE = 'DAT'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
DATA_TAB = IT_KNA1
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF IT_KNA1[] IS INITIAL.
FG_DATA_EXIST = ' '.
ENDIF.
ENDFORM. " get_data
*& Form GENERATE_DATASET
text
--> p1 text
<-- p2 text
FORM GENERATE_DATASET.
MESSAGE I010 WITH 'OPENING FILE IN APPLICATION SERVER'.
**--Creating a data set in application server
OPEN DATASET V_FNAME FOR OUTPUT IN TEXT MODE.
**---Transfering data from internal table to dataset
MESSAGE I010 WITH 'TRANSFERING DATA FROM INETERAL TABLE TO THE FILE'.
LOOP AT IT_KNA1.
TRANSFER IT_KNA1 TO V_FNAME.
ENDLOOP.
**--Closing the dataset
MESSAGE I010 WITH 'CLOSING THE FILE'.
CLOSE DATASET V_FNAME.
ENDFORM. " GENERATE_DATASET
*& Form BDC_DYNPRO
text
-->P_0467 text
-->P_0468 text
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
*& Form BDC_FIELD
text
-->P_0472 text
-->P_0473 text
FORM BDC_FIELD USING FNAM FVAL.
IF NOT FVAL IS INITIAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDIF.
ENDFORM.
*& Form GENERATE_BDCDATA
text
--> p1 text
<-- p2 text
FORM GENERATE_BDCDATA.
REFRESH IT_KNA1.
Opening dataset for reading
OPEN DATASET V_FNAME FOR INPUT IN TEXT MODE.
Reading the file from application server
DO.
CLEAR: IT_KNA1,IT_BDCDATA.
REFRESH IT_BDCDATA.
READ DATASET V_FNAME INTO IT_KNA1.
IF SY-SUBRC <> 0.
EXIT.
ELSE.
Populate BDC Data for Initial Screen
PERFORM : BDC_DYNPRO USING 'SAPMF02D' '0100',
BDC_FIELD USING 'BDC_CURSOR' 'RF02D-KUNNR',
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_FIELD USING 'RF02D-KUNNR' IT_KNA1-KUNNR,
BDC_FIELD USING 'RF02D-KTOKD' IT_KNA1-KTOKD.
Populate BDC Data for Second Screen
PERFORM : BDC_DYNPRO USING 'SAPMF02D' '0110',
BDC_FIELD USING 'BDC_CURSOR' 'KNA1-NAME1',
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_FIELD USING 'KNA1-NAME1' IT_KNA1-NAME1,
BDC_FIELD USING 'KNA1-SORTL' IT_KNA1-SORTL,
BDC_FIELD USING 'KNA1-ORT01' IT_KNA1-ORT01,
BDC_FIELD USING 'KNA1-PSTLZ' IT_KNA1-PSTLZ,
BDC_FIELD USING 'KNA1-LAND1' IT_KNA1-LAND1,
BDC_FIELD USING 'KNA1-SPRAS' IT_KNA1-SPRAS.
Populate BDC Data for Third Screen
PERFORM : BDC_DYNPRO USING 'SAPMF02D' '0120',
BDC_FIELD USING 'BDC_CURSOR' 'KNA1-LZONE',
BDC_FIELD USING 'BDC_OKCODE' '=UPDA',
BDC_FIELD USING 'KNA1-LZONE' IT_KNA1-LZONE.
CALL TRANSACTION C_XD01 USING IT_BDCDATA
MODE C_MODE
UPDATE C_UPDATE
MESSAGES INTO IT_MSG.
IF SY-SUBRC <> 0.
*--In case of error list display
IF R_LIST = C_X.
V_ERRREC = V_ERRREC + 1.
PERFORM FORMAT_MESSAGE.
IT_ERR_MSG-MESSAGE = V_MSG.
APPEND IT_ERR_MSG.
CLEAR : V_MSG,IT_ERR_MSG.
ENDIF.
*--In case of session log
IF R_SESS = C_X.
*-- In case of transaction fails.
IF FG_SESSION_OPEN = ' '.
FG_SESSION_OPEN = C_X.
PERFORM BDC_OPEN_GROUP.
ENDIF. " IF FG_SESSION_OPEN = ' '.
*-- Insert BDC Data..
PERFORM BDC_INSERT_DATA.
ENDIF. " IF R_SESS = C_X.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF SY-SUBRC <> 0.
ENDDO.
Closing the dataset
CLOSE DATASET V_FNAME.
*-- Close the session if opened
IF FG_SESSION_OPEN = C_X.
PERFORM BDC_CLOSE_GROUP.
CALL TRANSACTION 'SM35'.
ENDIF.
ENDFORM. " GENERATE_BDCDATA
*& Form BDC_OPEN_GROUP
text
--> p1 text
<-- p2 text
FORM BDC_OPEN_GROUP.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = C_SESS
HOLDDATE = FILLER8
KEEP = C_X
USER = SY-UNAME
RECORD = FILLER1
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " BDC_OPEN_GROUP
*& Form BDC_INSERT_DATA
text
--> p1 text
<-- p2 text
FORM BDC_INSERT_DATA.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = C_XD01
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " BDC_INSERT_DATA
*& Form BDC_CLOSE_GROUP
text
--> p1 text
<-- p2 text
FORM BDC_CLOSE_GROUP.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 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.
ENDFORM. " BDC_CLOSE_GROUP
*& Form FORMAT_MESSAGE
text
--> p1 text
<-- p2 text
FORM FORMAT_MESSAGE.
CLEAR V_LINES.
DESCRIBE TABLE IT_MSG LINES V_LINES.
READ TABLE IT_MSG INDEX V_LINES.
CLEAR V_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MSG-MSGID
LANG = IT_MSG-MSGSPRA
NO = IT_MSG-MSGNR
V1 = IT_MSG-MSGV1
V2 = IT_MSG-MSGV2
V3 = IT_MSG-MSGV3
V4 = IT_MSG-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " FORMAT_MESSAGE
*& Form DISPLAY_ERR_RECS
text
--> p1 text
<-- p2 text
FORM DISPLAY_ERR_RECS.
LOOP AT IT_ERR_MSG.
WRITE: / IT_ERR_MSG-MESSAGE.
ENDLOOP.
ENDFORM. " DISPLAY_ERR_RECS
Hope this resolves your query.
Reward all the helpful answers.
Regards -
Hi there,
i have Q i have excel file it need to be block with password. Could you please explain how i make password protect to Excel document
ThanksOn the File menu, click Save As.
On the Tools menu, click General Options.
Do either or both of the following:
If you want users to enter a password before they can view the workbook, type a password in the Password to open box, and then click OK.
If you want users to enter a password before they can save changes to the workbook, type a password in the Password to modify box.
NOTE Unlike passwords you specify in the Password to open box, passwords you specify in the Password to modify box are not encrypted. These passwords are only meant to give specific users permission to modify workbook data. For optimal password security, it's best to assign both passwords. An encrypted password to access the workbook, and one to provide specific users with permission to modify its content. IMPORTANT Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you don't have to write it down.
If you want to use a different encryption type, click Advanced, click the type you want in the Choose an encryption type list, and then click OK.
If needed, specify the number of characters you want in the Choose a key length box.
NOTE Document property encryption is enabled by default for most encryption types and providers. It prevents unauthorized users from viewing summary and custom file properties (such as the author or any custom file information) in theProperties dialog box. When users right-click the password-protected file, and then click Properties, information won't be available on the Summary tab and Customtab. Authorized users, however, can open the file and view all file properties (Filemenu, Properties command). To disable document property encryption, clear theEncrypt document properties check box.
Click OK.
When prompted, retype your passwords to confirm them.
Click Save.
If prompted, click Yes to replace the existing workbook.
NOTE You can also secure a workbook with a password on the Security tab of the Options dialog box (Tools menu, Options command). -
How can one read a Excel File and Upload into Table using Pl/SQL Code.
How can one read a Excel File and Upload into Table using Pl/SQL Code.
1. Excel File is on My PC.
2. And I want to write a Stored Procedure or Package to do that.
3. DataBase is on Other Server. Client-Server Environment.
4. I am Using Toad or PlSql developer tool.If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
1. Get your DBA to create directory object in oracle using the following command:
create directory TEST_DIR as ‘directory_path’;
Note: This directory is on the server.
2. Grant read,write on directory directory_object_name to username;
You can find out the directory_object_name value from dba_directories view if you are using the system user account.
3. Logon as the user as mentioned above.
Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
function getData(p_filename in varchar2,
p_filepath in varchar2
) RETURN VARCHAR2 is
input_file utl_file.file_type;
--declare a buffer to read text data
input_buffer varchar2(4000);
begin
--using the UTL_FILE in built package
input_file := utl_file.fopen(p_filepath, p_filename, 'R');
utl_file.get_line(input_file, input_buffer);
--debug
--dbms_output.put_line(input_buffer);
utl_file.fclose(input_file);
--return data
return input_buffer;
end;
Hope this helps. -
How to retrieve data from a read-only Excel file
Hi Developers,
I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
My code is as followed:
try
InputStream KpExcel = new FileInputStream("kp.xls");
HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
catch(Exception e)
e.printStackTrace();
System.out.println("Exception: "+e.getMessage());
The error I received is as followed:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
at photoproductionsystem.Display.create(Display.java:73)
at photoproductionsystem.Display.init(Display.java:44)
at photoproductionsystem.Display.main(Display.java:229)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
... 15 more
Can someone please help me with my problem? Thanks a lot in advance!Madeline wrote:
how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
http://poi.apache.org/mailinglists.html -
How to read an excel file in webdynpro application
Hello Experts,
Can someone please tell me how to read an excel file in a webdynpro application?
There is a tutorial for how to write contect into an excel, but i want to read the excel.
Can someone help please !!
Thanks and Kind regards,
G.Singh.Hello Experts,
I have done all the given above.
I want to read a excel file from KM. My code is as below
ResourceContext resourceContext = buildResourceContext();
IResourceFactory resourceFactory = ResourceFactory.getInstance();
RID pathRID = RID.getRID("/documents/ExcelReport.xls");
IResource resource = resourceFactory.getResource(pathRID, resourceContext);
Workbook wb = Workbook.getWorkbook(resource.getURI().getPath());
Sheet sh = wb.getSheet(0);
int columns = sh.getColumns();
int rows = sh.getRows();
wdComponentAPI.getMessageManager().reportSuccess(" Rows: " + rows);
wdComponentAPI.getMessageManager().reportSuccess(" Columns: " + columns);
This does not give me the excel file form the KM
Can you please just what i can do at this point?
Kind Regards,
G Singh. -
How can i read local excel file into internal table in webdynpro for abap a
Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
thank u for your replyDeep,
File manuplations...............................
1. At the presentation level:
->GUI_UPLOAD
->GUI_DOWNLOAD
->CL_GUI_FRONTEND
2. At the application server level:
->OPEN DATASET : open a file in the application server for reading or writing.
->READ DATASET : used to read from a file on the application server that has been opened for reading
-> TRANSFER DATASET : writing data to a file.
-> CLOSE DATASET : closes the file
-> DELETE DATASET : delete file
If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
call function 'GUI_UPLOAD'
exporting
filename = p_file
filetype = 'ASC'
has_field_separator = '#'
tables
data_tab = t_data
p_file : excel file path.
t_data : internal table
<b>reward points if useful.</b>
regards,
Vinod Samuel. -
How to make iTunes read the song's name/singer from the file's name itself?
Hi everyone,
So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.iTunes doesn't use file names to determine how music appears in your library, Rather, it uses metadata that is split between:
data elements that are embedded within the media files
data elements that are included in the entries in the iTunes database
No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes. Using your example:
the value of the track number element is 1
the value of the artist element is "Elvis Presley"
the value of the song name element is "Blue Suede Shoes"
Depending on how you configure iTunes then the file name is either:
completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
the file is in a folder called "Elvis Presley" (the name of the album)
that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works. There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step. However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes. -
How to make restoration of corrupted excel 2007 file?
Hi there,
When I open an excel file the following error message is displayed: “The file may be corrupted, located on a server that is not responding, or read only”.
Since this happened whenever I open any excel file, the above error message is again displayed, I must also mention that I am sure my files are not read-only and the files are stored on my hard disk and I use VM ware and my OS is windows server!
How can I solve this problem?You may copy the file to another computer with Excel installed, and open it. If the error still exist, then your file is corrupt. Otherwise, there may be some problems with your Excel in the original computer and you need to uninstall/reinstall Excel.
If the file is corrupt, then you can try several methods to recover it:
1. First of all, you can try to repair the file manually in Excel, as follows:
(1) On the File menu, click Open.
(2) In the Open dialog box, select the file you want to open, and click the arrow next to the Open button.
(3) Click Open and Repair, and then choose which method you want to use to recover your workbook.
You may find more information about this at:
http://office.microsoft.com/en-us/ex...001034656.aspx (for Excel 2003)
http://office.microsoft.com/en-us/ex...017.aspx?CTT=1 (for Excel 2007)
http://office.microsoft.com/en-us/ex...840.aspx?CTT=1 (for Excel 2010)
http://office.microsoft.com/en-us/ex...554.aspx?CTT=1 (for Excel 2013)
2. If method 1 fails, there are still several methods to recover your Excel file manually with Excel, including writing a small VBA macro, as below
http://office.microsoft.com/en-us/ex...#_Toc337637262
3. Third, there are also free tools from third-parties that can open and read Microsoft Excel files, for example,
3.1 OpenOffice at http://www.openoffice.org. This is a very famous open source project that is designed to support Office file formats, including Excel files. The software can run under Windows.
3.2 KingSoft Spreadsheets at
http://www.kingsoftstore.com/office/free-excel. This is a free Windows tool that can open Excel files.
3.3 Google Drive at https://drive.google.com/ also support to load Excel files.
Sometimes when Excel fails to open your file, these tools may be able to open it successfully. If that is the case, then after the Excel file is opened, you can just save it as a new file which will be error-free.
4. For xlsx files, they are actually a group of files compressed in Zip file format. Therefore, sometimes, if the corruption is only caused by the Zip file, then you can use Zip repair tools such as WinRAR at
http://www.rarlab.com to repair the file, as follows:
4.1 Assuming the corrupt Excel file is a.xlsx, then you need to rename it to a.zip
4.2 Start WinRAR, go to "Tools > Repair Archive" to repair a.zip and generated a fixed file a_fixed.zip.
4.3 Rename a_fixed.zip back to a_fixed.xlsx
4.4 Using Excel to open a_fixed.xlsx.
There may still be some warnings when opening the fixed file in Excel, just let ignore it and Excel will try to open and repair the fixed file. If the file can be opened successfully, then you can just save the contents into another error-free file.
5. If all above methods do not work, then you may try third-party tools such as DataNumen Excel Repair at
http://www.datanumen.com/excel-repair/
I have used it to recover some Excel files successfully. It provides a free demo version so that you can try to see if the data you want can be recovered or not.
Good luck! -
How can I read the EXCEL file while Program is running in background.
Hi all Expert,
How can I read the EXCEL file while Program is running in background.
Thanksyou need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
loots of information if you can search forum.. thanks -
How can I read a Excel file?
How can I read an Excel file and compare if the cells type are numeric or not??
i hope you can can give me a hand..
thanksIf you want to use plsql try utl_file supplied package to read the excel file -> http://psoug.org/reference/utl_file.html
And you can use a function like this to understand if the column is number or not ;
CREATE OR REPLACE FUNCTION is_number (
char_in VARCHAR2)
RETURN BOOLEAN
IS
n NUMBER;
BEGIN
n := TO_NUMBER(char_in);
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END is_number;
DECLARE
x BOOLEAN;
BEGIN
IF is_number('ABC') THEN
dbms_output.put_line('TRUE');
ELSE
dbms_output.put_line('FALSE');
END IF;
END;
/ -
How to read an excel file which contains multiple tabs using File adapter
Hi BPEL gurus,
I have a requirement where i need to read an EXCEL file, which has three tabs inside the file. All the three tabs has data in it. I have seen few examples where file adapter reads an excel file with data present inside a single tab but not with multiple tabs.
If anyone has worked on this scenario, please provide your suggestions/inputs/links etc.
Thanks in advancehi Sathish,
this might help
PI/XI: Reading MS Excel's XLSX and XLSM files with standard PI modules - easily...
thanks and regards,
Praveen T -
How to read from excel file and write it using implicit jsp out object
our code is as below:Please give us proper solution.
we are reading from Excel file and writing in dynamicaly generated Excel file.it is writing but not as original excel sheet.we are using response.setContentType and response.setHeader for generating pop up for saveing the original file in to dynamically generated Excel file.
<%@ page contentType="application/vnd.ms-excel" %>
<%
//String dLoadFile = (String)request.getParameter("jspname1");
String dLoadFile = "c:/purge_trns_nav.xls" ;
File f = new File(dLoadFile);
//set the content type(can be excel/word/powerpoint etc..)
response.setContentType ("application/msexcel");
//get the file name
String name = f.getName().substring(f.getName().lastIndexOf("/") + 1,f.getName().length());
//set the header and also the Name by which user will be prompted to save
response.setHeader ("Content-Disposition", "attachment; filename="+name);
//OPen an input stream to the file and post the file contents thru the
//servlet output stream to the client m/c
FileInputStream in = new FileInputStream(f);
//ServletOutputStream outs = response.getOutputStream();
int bit = 10;
int i = 0;
try {
while (bit >= 0) {
bit = in.read();
out.write(bit) ;
} catch (IOException ioe) { ioe.printStackTrace(System.out); }
out.flush();
out.close();
in.close();
%>If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
import java.nio.*;
import java.nio.channels.*;
import java.io.*;
import java.util.*;
import java.text.*;
class Kopy {
* @param args [0] = source filename
* args [1] = destination filename
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.err.println ("Syntax: java -cp . Kopy source destination");
System.exit(1);
File in = new File(args[0]);
long fileLength = in.length();
long t = System.currentTimeMillis();
FileInputStream fis = new FileInputStream (in);
FileOutputStream fos = new FileOutputStream (args[1]);
FileChannel fci = fis.getChannel();
FileChannel fco = fos.getChannel();
fco.transferFrom(fci, 0, fileLength);
fis.close();
fos.close();
t = System.currentTimeMillis() - t;
NumberFormat nf = new DecimalFormat("#,##0.00");
System.out.print (nf.format(fileLength/1024.0) + "kB copied");
if (t > 0) {
System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
} -
How can I read an excel file .xls from an forms 6i
Hi
I have forms6i and webutil don t work with this version, can I read an excel file from forms6i.
Thank uHi hosoriol,
You can refer an excel as an external table first using the steps below and then you can start reading from it.
If you want to update the excel file then create an view and create instead of triggers for it.
Steps
h3. 1.[Create an external table for the excel file |http://www.adp-gmbh.ch/ora/misc/ext_table.html|Click here to view detailed description]
h4. 1. Create a directory in Oracle where you have kept the xls file
create or replace directory ext_dir as '/home/rene/ext_dir';h4. 2. grant read, write on directory ext_dir to scott;
h4. 3. creating the external table
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;
Note_
If you want to update the excel file then create a view and then create the instead of triggers to do the update, delete or insert.[Creating views on external tables | http://www.dba-oracle.com/oracle_news/2005_9_1_updating_external_tables.htm]
h3. 2. Use the data block wizard and connect to the corresponding schema and create a database block.
Kindly click Correct or Helpful if it helps Thanks :-)
Maybe you are looking for
-
Mail receiving messages partially then crashing...
I can open up mail still receive RSS feeds and send messages, but when I try to get new mail, anywhere between 7 to 17 messages are received before the loading speed goes from 400-600 kilobytes down to 0. Any help would be much appreciated! -Zack
-
Help a newbie get going w/ cldc
Hello, I've been struggling for several hours now trying to j2me to work w/ a palm emulator. I'm becoming increasingly frustrated since at every turn I have to download another package to get this to work . So far, I've gotten the wireless toolk
-
The before after...
I once had a program that disabled a button when a frame/dialog was visible, and then enabled the button when the frame/dialog was not visible... problem is, I can't remember how to do something like that! if you could guide me i'd appreciate it, tha
-
Dear All, Good Evening, My requirement is pass header level(first vo) inventory item id to 2nd region for this i create a view link based on these 2 view objects. for this i wrote the code like this, xxcrmForQuoteOrderItemsVOImpl vo = getxxcrmForQuot
-
1 hr vs. 2 hr to a disc
When creating a project to be burned on a Verbatim DVD, I know the limit is up to 2 hours. Now, conversely, if I only have 45 mins to one hour, can the DVD burned in one-hour mode, perhaps improving the quality of the picture? Or are recording speeds