w*******g 发帖数: 51 | 1 兄弟手上有那么几万个excel文件,需要把里面的内容存成tab或者逗号分隔的文本文件,
或者某种自己定义的简单的xml格式文件。哪位仁兄有此方面的经验? | k*****c 发帖数: 6 | 2 The following are 2 vb code blocks, maybe helpful to you.
public sub ReadExcelFile
dim sTemp as string
Dim Range As Excel.Range
Set Range = Sheet.UsedRange
iCols = Range.Columns.Count
iRows = Range.Rows.Count
With Range.Cells
For i = 1 To iRows
For j = 1 To iCols
sTemp = .Item(i, j).Value
next j
next i
end sub
public sub SaveExcelFileAsText
Dim xl As Excel.Application
Dim Workbook As Excel.Workbook
Dim
【在 w*******g 的大作中提到】 : 兄弟手上有那么几万个excel文件,需要把里面的内容存成tab或者逗号分隔的文本文件, : 或者某种自己定义的简单的xml格式文件。哪位仁兄有此方面的经验?
|
|