Hi, can be detailed example of how the loading procedure importfromfile? no it does not work. an error - Cannot import file to the datasource "EXCEL_FILE_DATA11". The file is empty or is not in the specified format "xls"

Thanks.

asked 19 Jun '13, 01:43

Alexandr's gravatar image

Alexandr
15
accept rate: 0%


Hi Alexandr,

It seems like the BLOB is either null or the BLOB is not in the XLS format.

There is a code example in the API Documentation:

declare
   v_datasourceColumnNames_t api_datasource.tt_datasourceColumnNames;
   v_bl blob;
 begin
   v_datasourceColumnNames_t(1) := 'FIRST_NAME';
   v_datasourceColumnNames_t(2) := 'SALARY';
   v_datasourceColumnNames_t(3) := 'HIRE_DATE';
   v_bl := api_component.getvaluebl('mainPanel.fileUpload'); -- assuming that you are retrieving  the file through the file upload component
   api_datasource.importfromfile('EMPLOYEES1', v_bl, api_datasource.FILE_FORMAT_XLS, v_datasourceColumnNames_t);
 end;

You need to upload an Excel file first. The links below explain how file upload works:

http://theformspider.com/learningcenter/tutorial-15-how-to-upload-a-file/ http://theformspider.com/learningcenter/how-to-upload-photo-to-image-component-at-run-time/

If these don't help, could you please send us the Excel File you are trying to upload and the column names and their types of the datasource you are trying to import into.

Kind Regards, Yalim

link

answered 19 Jun '13, 15:27

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 23%

OK, all right, thank you !

link

answered 19 Jun '13, 23:24

Alexandr's gravatar image

Alexandr
15
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: 19 Jun '13, 01:43

Seen: 843 times

Last updated: 19 Jun '13, 23:24


© Copyright Gerger 2017