excel gettable中文
This commit is contained in:
@@ -141,7 +141,25 @@ Type xlsxWorkBook = Class
|
|||||||
Function GetTable(sheet, topLeft, bottomRight);
|
Function GetTable(sheet, topLeft, bottomRight);
|
||||||
Begin
|
Begin
|
||||||
o := GetSheetObj(sheet);
|
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;
|
End;
|
||||||
|
|
||||||
///创建新sheet
|
///创建新sheet
|
||||||
|
|||||||
Reference in New Issue
Block a user