diff --git a/funcext/TSOffice/worksheet/xlsxWorkBook.tsf b/funcext/TSOffice/worksheet/xlsxWorkBook.tsf index a1ee763..a73540c 100644 --- a/funcext/TSOffice/worksheet/xlsxWorkBook.tsf +++ b/funcext/TSOffice/worksheet/xlsxWorkBook.tsf @@ -141,7 +141,25 @@ Type xlsxWorkBook = Class Function GetTable(sheet, topLeft, bottomRight); Begin o := GetSheetObj(sheet); - if ifObj(o) then return o.Import(topLeft, bottomRight); + if ifObj(o) then + begin + data := o.Import(topLeft, bottomRight, includeHeader, includeIndex, forceSingle); + if not TOfficeApi().IsUtf8() then + begin + fields := fieldnames(data); + if ifarray(fields) and length(fields) then + begin + map := array(); + for i:=0 to length(fields)-1 do + map[fields[i]] := class(TSXml).Utf8ToCurCodePage(fields[i]); + reindex(data, nil, map); + end + data::begin + if ifstring(mcell) then mcell := class(TSXml).Utf8ToCurCodePage(mcell); + end + end + return data; + end End; ///创建新sheet