本帖最后由 空竹 于 2023-12-31 14:51 编辑
|
高级表格导出Excel_W版 | 逻辑型 | | |
高级表格 | 高级表格 | | | | 保存路径W | 字节集 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | WBook | LibxlW_Book | | | WSheet | LibxlW_Sheet | | | WFormat | LibxlW_Format | | | col | 整数型 | | | row | 整数型 | | | 高级表格列类型 | 整数型 | | | wText | 字节集 | | | aText | 文本型 | | |
如果 (WBook. 创建_XLSX ())  返回 (假)WBook.注册 (, )WSheet = WBook. 表格_添加 (LibxlW_A2W (“Sheet1”, , , ), ) 变量循环首 (0, 高级表格.列数 - 1, 1, col ) 高级表格列类型 = 高级表格. 取列类型 (col ) 变量循环首 (0, 高级表格.行数 - 1, 1, row ) 调试输出 (row, col )  判断 (高级表格列类型 = #表格常量 .宽文本型 )   wText = 高级表格. 取宽文本数据 (row, col )   如果 (wText = { })        WSheet. 单元格_置值_文本和格式 (row, col, wText, )       aText = 到文本 (高级表格. 取数据 (row, col ))    如果 (aText = “”)        WSheet. 单元格_置值_文本和格式 (row, col, LibxlW_A2W (aText, , , ), )     WFormat = WSheet.单元格_取格式_类 (row, col)  WFormat. 置_边框 ( #Borderstyle_Thin ) 变量循环尾 () 变量循环尾 () 如果 (WBook. 保存 (保存路径W )) 返回 (真) 返回 (假)
用到的模块:LibXL 4.0.4 【Unicode版excel操作】【excel截图】
https://bbs.125.la/forum.php?mod=viewthread&tid=14755679
(出处: 精易论坛)
用到的支持库:高级表格支持库 3.0#4版 - 20200725
https://bbs.125.la/forum.php?mod=viewthread&tid=14602106
(出处: 精易论坛)
|