Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出C#数据类,没有实现 Deserialize 方法 #90

Open
KeepUpCode opened this issue Aug 17, 2021 · 9 comments
Open

导出C#数据类,没有实现 Deserialize 方法 #90

KeepUpCode opened this issue Aug 17, 2021 · 9 comments

Comments

@KeepUpCode
Copy link

C#按需读取二进制数据
导出命令:
tabtoy -mode=v3 -index=Index.xlsx -package=main -csharp_out=table_gen.cs -binary_dir=.
导出C#数据类,没有实现 Deserialize 方法
是需要自己手动实现吗?

@davyxu
Copy link
Owner

davyxu commented Aug 17, 2021

导出二进制格式时, 才会生成Deserialize方法. Deserialize对应的是二进制解析

@KeepUpCode
Copy link
Author

tabtoy -mode=v3 -index=Index.xlsx -package=main -csharp_out=table_gen.cs -binary_dir=.
这个命令不就是导出二进制格式的吗

@davyxu
Copy link
Owner

davyxu commented Aug 17, 2021

更新下tabtoy

@KeepUpCode
Copy link
Author

KeepUpCode commented Aug 17, 2021

更新下tabtoy

我使用的是最新的 3.1.1 版本啊

还有个问题,我想修改导出二进制文件的后缀为 .bytes ,是修改 flag.go 文件里边的这个地方吗(下图)
image

@davyxu
Copy link
Owner

davyxu commented Aug 17, 2021

导出后, 你用shell改下名就好了嘛, 何必这么搞

@laniidae
Copy link
Contributor

大大, 我也遇到了同样的问题, 导出的 C# 数据类没有 Deserialize 方法
tabtoy 版本 3.1.1, 使用的数据表来自 v3\example\tutorial, 未做修改
生成的数据类如图
image

@laniidae
Copy link
Contributor

我使用的也是该指令
tabtoy -mode=v3 -index=Index.xlsx -package=main -csharp_out=table_gen.cs -binary_dir=.

@davyxu
Copy link
Owner

davyxu commented Nov 26, 2021

更新3.1.2

@laniidae
Copy link
Contributor

更新3.1.2

可以了. 实在太给力了 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants