data: it_excel like alsmex_tabline occurs
0with
header
line.
parameters fn like rlgrap-filename memory
id mo1.
at selection-screen
onvalue-request for fn.
data: i_rc type
i,i_filetable type filetable.
call
method cl_gui_frontend_services=>file_open_dialog
exporting
window_title = '選擇原始檔'
file_filter = 'excel檔案 (*.xls)|*.xls|全部檔案 (*.*)|*.*|'
multiselection = space
changing
file_table = i_filetable
rc = i_rc
exceptions
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
others = 5.
if sy-subrc = 0
and i_rc = 1.
read
table i_filetable into fn index
1.endif.
start-of-selection.
call
function
'alsm_excel_to_internal_table'
exporting
filename = fn
i_begin_col = 1
i_begin_row = 1
i_end_col = 100
i_end_row = 65536
tables
intern = it_excel
讀取Excel檔案
閒話一下excel中工作簿和工作表的區別 工作簿中包含有工作表。工作簿可以由一張或多張工作表組成,乙個工作簿就是乙個excel 檔案。好了,開始讀取 檔案吧。前提 首先,我們假設需要讀取的 檔案名字為test.xls,位於assets根目錄下。所需jar包 這裡為了能讀取到excel 檔案,我們要新...
R讀取excel檔案
一 使用軟體包xlsreadwrite library xlsreadwrite data read.xls choose.files d r rscript mydm wang2.xls 二 使用軟體包xlconnect library xlconnectjars library xlconnec...
PHPExcel 讀取Excel檔案
讀取excel檔案內容 dir str replace dirname file 當前檔案目錄 require once dir.phpexcel iofactory.php 引入excel類庫檔案 filename dir.browser.xls 操作的excel檔案 excelobj phpex...