Upload excel file 到 INTERNAL TABLE 的方法
FORM upload_data .
DATA:w_tab LIKE it_excel.
DATA:lt_excel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
DATA:l_tabix1 LIKE sy-tabix.
FIELD-SYMBOLS:
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = 2
i_end_col = 16
i_end_row = 5000
TABLES
intern = lt_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE s398 WITH 'Error occurs when upload Excel file!'.
STOP.
ENDIF.
*&SORT lt_intern BY row col.
LOOP AT lt_excel.
AT NEW row.
l_tabix1 = sy-tabix.
ENDAT.
AT END OF row.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE w_tab TO
IF sy-subrc = 0.
READ TABLE lt_excel INDEX l_tabix1.
IF sy-subrc = 0 AND lt_excel-col = sy-index.
TRANSLATE lt_excel-value TO UPPER CASE.
ADD 1 TO l_tabix1.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
APPEND w_tab TO it_excel.
CLEAR w_tab.
ENDAT.
ENDLOOP.
ENDFORM. " upload_data
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90072/viewspace-927534/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DVWA--File Upload
- angular-file-upload 在IE下使用的坑Angular
- Salesforce LWC學習(二十七) File UploadSalesforce
- [Design Pattern] Upload big file - 1. Background & Solution overviewView
- HTML Table 輸出ExcelHTMLExcel
- 上傳報錯:Upload Failed: Your upload has failed a virus scan. Please choose another file.AI
- [Design Pattern] Upload big file - 3. Code Design - part 1
- [Design Pattern] Upload big file - 2. How to coordinate frontend and backend
- el-upload拍照上傳多個檔案報錯 ERR_UPLOAD_FILE_CHANGED問題
- [Design Pattern] Upload big file - 4. Code Design - part 2 & Summary
- 百度翻譯 Excel TableExcel
- MySQL InnoDB File-Per-Table表空間MySql
- C# read excel file via ExcelDataReaderC#ExcelLDA
- jquery ajax file upload NET MVC 無重新整理檔案上傳jQueryMVC
- 金山文件怎麼匯出excel檔案 金山文件到處excel檔案的方法Excel
- Vue+element ui table 匯出到excelVueUIExcel
- html table 匯出excel,親測有效HTMLExcel
- MyIsam 表 “ Incorrect key file for table 't_ '; try to repair it”AI
- bootstrap Table的使用方法boot
- 利用poi將Html中table轉為ExcelHTMLExcel
- python中file物件的常用方法Python物件
- vue+elementUI el-table匯出excel表格VueUIExcel
- element-UI庫Table表格匯出Excel表格UIExcel
- TableTools Export Excel前Table內容格式的轉換應用ExportExcel
- EXCEL資料上傳到SQL SERVER中的簡單實現方法ExcelSQLServer
- ALTER TABLE修改列的不同方法
- ANT 的Table表格樣式修改方法
- MySQL rename table方法大全MySql
- VulNyx - Internal
- 【JAVA :File類的用法(一)】File類的構造方法-File類建立檔案與資料夾Java構造方法
- 在 `el-upload` 的事件中傳遞更多引數的方法事件
- elementui upload元件 上傳視訊到七牛雲UI元件
- 使用 Laravel-Excel 和流的方法匯出 ExcelLaravelExcel
- 7種Excel表格打勾√的方法 Excel怎麼打勾?Excel
- Element-ui元件庫Table表格匯出Excel表格UI元件Excel
- SAP UI5 表格資料如何匯出成 Excel 檔案(Table Export As Excel)UIExcelExport
- table 固定標題的方法(tr標籤)
- React antdesign upload元件自定義上傳到S3React元件S3
- Upload Files