gpt4 book ai didi

excel - 我可以使用什么文本格式来呈现 Excel 电子表格中的原始数据?

转载 作者:行者123 更新时间:2023-12-04 21:42:11 24 4
gpt4 key购买 nike

我有一个 Excel 电子表格,其中包含许多人对另一个人的高度和体重的估计。此外,有些人在这两个估算单元格上都留下了评论,例如“此估算考虑了某某”。

我想从电子表格中获取数据(我已经想出了如何解析它),并将其表示为纯文本文件,以便我可以轻松地将其解析回结构化格式(理想情况下使用 Perl)。

最初我想使用 YAML:

Tom:
Height:
Estimate: 5
Comment: Not that confident
Weight:
Estimate: 7
Comment: Very confident
Natalia: ...

但是现在我认为这有点难以阅读,我想知道是否有一些文本表格表示会更容易阅读并且仍然可以解析。

就像是:
PERSON      HEIGHT     Weight
-----------------------------
Tom 5 7
___START_HEIGHT_COMMENT___
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed [...]
Wait, what's this project about again?
___END_HEIGHT_COMMENT___
___START_WEIGHT_COMMENT___
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed [...]
Wait, what's this project about again?
___END_WEIGHT_COMMENT___

Natalia 2 4
John 3 3

有一个更好的方法吗?

最佳答案

CSV (Comma Separated Values)。

您甚至可以将其从 Excel 中直接保存为这种格式,并从这种格式中直接将其读入 Excel。然而,它也是人类可读的,并且易于机器解析。

关于excel - 我可以使用什么文本格式来呈现 Excel 电子表格中的原始数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/928513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com