v1.5.9
This commit is contained in:
parent
522e52ed46
commit
6d6281229c
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.5.8
|
// Version 1.5.9
|
||||||
Function TOfficeObj(n);
|
Function TOfficeObj(n);
|
||||||
Begin
|
Begin
|
||||||
case lowercase(n) of
|
case lowercase(n) of
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.5.8
|
// Version 1.5.9
|
||||||
Type TSDocxFile = Class
|
Type TSDocxFile = Class
|
||||||
///Version: V1.0 2022-09-20
|
///Version: V1.0 2022-09-20
|
||||||
///适用于 Microsoft Word docx格式文件
|
///适用于 Microsoft Word docx格式文件
|
||||||
|
|
@ -49,7 +49,7 @@ Type TSDocxFile = Class
|
||||||
Begin
|
Begin
|
||||||
if not ifObj(zipfile_) then return array(-1, 'Create ZipFile object fail.');
|
if not ifObj(zipfile_) then return array(-1, 'Create ZipFile object fail.');
|
||||||
if zipfile_.FilesCount() > 0 then zipfile_ := new ZipFile();
|
if zipfile_.FilesCount() > 0 then zipfile_ := new ZipFile();
|
||||||
[err, errmsg] := zipfile_.Open(alias, fname, passwd);
|
[err, errmsg] := zipfile_.Open(alias, TOfficeApi().CurCodePageToGBK(fname), passwd);
|
||||||
if err=0 then Begin
|
if err=0 then Begin
|
||||||
document_ := new docxDocument(zipfile_);
|
document_ := new docxDocument(zipfile_);
|
||||||
End;
|
End;
|
||||||
|
|
@ -87,7 +87,7 @@ Type TSDocxFile = Class
|
||||||
///返回: [err, info]
|
///返回: [err, info]
|
||||||
Function SaveAs(alias, fname);
|
Function SaveAs(alias, fname);
|
||||||
Begin
|
Begin
|
||||||
return zipfile_.Save(alias, fname);
|
return zipfile_.Save(alias, TOfficeApi().CurCodePageToGBK(fname));
|
||||||
End;
|
End;
|
||||||
|
|
||||||
///另存为二进制流数据
|
///另存为二进制流数据
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.5.8
|
// Version 1.5.9
|
||||||
Type TSXlsxFile = Class
|
Type TSXlsxFile = Class
|
||||||
///Version: V1.0 2022-08-08
|
///Version: V1.0 2022-08-08
|
||||||
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
||||||
|
|
@ -45,7 +45,7 @@ Type TSXlsxFile = Class
|
||||||
Begin
|
Begin
|
||||||
if not ifObj(zipfile_) then return array(-1, 'Create ZipFile object fail.');
|
if not ifObj(zipfile_) then return array(-1, 'Create ZipFile object fail.');
|
||||||
if zipfile_.FilesCount() > 0 then zipfile_ := new ZipFile();
|
if zipfile_.FilesCount() > 0 then zipfile_ := new ZipFile();
|
||||||
[err, errmsg] := zipfile_.Open(alias, fname, passwd);
|
[err, errmsg] := zipfile_.Open(alias, TOfficeApi().CurCodePageToGBK(fname), passwd);
|
||||||
if err=0 then InitVars();
|
if err=0 then InitVars();
|
||||||
return array(err, errmsg);
|
return array(err, errmsg);
|
||||||
End;
|
End;
|
||||||
|
|
@ -96,7 +96,7 @@ Type TSXlsxFile = Class
|
||||||
///返回: [err, info]
|
///返回: [err, info]
|
||||||
Function SaveAs(alias, fname);
|
Function SaveAs(alias, fname);
|
||||||
Begin
|
Begin
|
||||||
return zipfile_.Save(alias, fname);
|
return zipfile_.Save(alias, TOfficeApi().CurCodePageToGBK(fname));
|
||||||
End;
|
End;
|
||||||
|
|
||||||
///真实文件名
|
///真实文件名
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue