mr-kelly / tableml Goto Github PK
View Code? Open in Web Editor NEWDataTable-based Markup Language for C# & Mono & Unity
License: Apache License 2.0
DataTable-based Markup Language for C# & Mono & Unity
License: Apache License 2.0
Exception: 无法打开Excel: Product/SettingSource\Billboard.xlsx, 可能原因:正在打开?或是Office2007格式(尝试另存为)? Specified argument was out of the range of valid values.
Parameter name: length
TableML.Compiler.SimpleExcelFile.ParseExcel (System.String filePath) (at e:/Workspace/TableML/TableML/TableMLCompiler/SimpleExcelFile.cs:137)
TableML.Compiler.SimpleExcelFile..ctor (System.String excelPath) (at e:/Workspace/TableML/TableML/TableMLCompiler/SimpleExcelFile.cs:120)
TableML.Compiler.Compiler.Compile (System.String path, System.String compileToFilePath, System.String compileBaseDir, System.Boolean doRealCompile) (at e:/Workspace/TableML/TableML/TableMLCompiler/Compiler.cs:317)
TableML.Compiler.BatchCompiler.CompileTableMLAll (System.String sourcePath, System.String compilePath, System.String genCodeFilePath, System.String genCodeTemplateString, System.String nameSpace, System.String changeExtension, System.String settingCodeIgnorePattern, System.Boolean forceAll) (at e:/Workspace/TableML/TableML/TableMLCompiler/BatchCompiler.cs:177)
KEngine.Editor.SettingModuleEditor.DoCompileSettings (System.Boolean force, System.String forceTemplate, System.Boolean canCustom) (at Assets/KSFramework/KEngine/Editor/KEngine.Editor/SettingModuleEditor.cs:190)
KEngine.Editor.SettingModuleEditor.CompileSettings () (at Assets/KSFramework/KEngine/Editor/KEngine.Editor/SettingModuleEditor.cs:148)
这是因为Office版本的原因么?
在WIN10/7 编译xlsx时,出现下面的提示。
提示信息:
D:\Git\TableML\TableML\TableMLCompilerConsole\bin\Debug>TableML.exe -f TestExcel2.xlsx
Filename: TestExcel2.xlsx
未经处理的异常: System.Exception: 无法打开Excel: TestExcel2.xlsx, 可能原因:正在打开?或是Office2007格式(尝试另存为)? 未能加载文件或程序集“ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”或它的某一个依赖项。系统找不到指定的文件。
在 TableML.Compiler.SimpleExcelFile.ParseExcel(String filePath) 位置 d:\Git\TableML\TableML\TableMLCompiler\SimpleExcelFile.cs:行号 130
在 TableML.Compiler.SimpleExcelFile..ctor(String excelPath) 位置 d:\Git\TableML\TableML\TableMLCompiler\SimpleExcelFile.cs:行号 113
在 TableML.Compiler.Compiler.Compile(String path, String compileToFilePath, String compileBaseDir, Boolean doRealCompile) 位置 d:\Git\TableML\TableML\TableMLCompiler\Compiler.cs:行号 317
在 TableML.Compiler.Compiler.Compile(String path) 位置 d:\Git\TableML\TableML\TableMLCompiler\Compiler.cs:行号 293
在 TableCompilerConsole.TableCompilerConsole.Main(String[] args) 位置 d:\Git\TableML\TableML\TableMLCompilerConsole\Program.cs:行号 36
编译xls文件,是正常的。
D:\Git\TableML\TableML\TableMLCompilerConsole\bin\Debug>TableML.exe -f TestExcel.xls
Filename: TestExcel.xls
Compile excel file: TestExcel.xls , to D:\Git\TableML\TableML\TableMLCompilerConsole\bin\Debug\TestExcel.tml
抛异常的130行代码行如下:
private void ParseExcel(string filePath)
{
using (var file = new FileStream(filePath, FileMode.Open, FileAccess.Read,FileShare.ReadWrite)) // no isolation
{
try
{
Workbook = WorkbookFactory.Create(file);
}
catch (Exception e)
{
throw new Exception(string.Format("无法打开Excel: {0}, 可能原因:正在打开?或是Office2007格式(尝试另存为)? {1}", filePath,
e.Message));
//IsLoadSuccess = false;
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.