如何将 Excel 表格转换为 Trac Wiki 表格式?
我看过复制品和将转换器粘贴为 MediaWiki 或 HTML 格式。但我找不到一种可以转换为 Trac Wiki 格式 (WikiFormattting) 的格式,该格式使用管道来分隔单元格,例如:
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
I've seen copy & paste converters to MediaWiki or HTML format. But I could not find one that converts to the Trac Wiki format (WikiFormattting) which uses pipes to separate cells, such as:
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将 Excel 工作表另存为 CSV 文件。然后从命令提示符(假设您运行的是 Windows XP 或更高版本)键入以下命令:
令牌的数量取决于您拥有的列数。通过增加标记数量并添加相应数量的变量名称 %d、%e 等,您可以在一次传递中最多执行 26 列。
You could save your excel sheet as a CSV file. Then from a command prompt (assuming you are running Windows XP or newer) type this command:
The number of tokens depends on how many columns you have. You could do up to 26 columns this way in a single pass by increasing the number of tokens and adding the corresponding number of variable names %d, %e, etc.
我制作了一个 jsFiddle 来执行此操作,只需将您的 CSV 测试放入
HTML
框并运行脚本。您要粘贴到 TracWiki 页面的内容将位于Result
框中。如果 jsFiddle 发生问题,这里是我使用的 JavaScript(我可能不需要使用 jQuery,但对我来说,必须考虑非 jQuery 方法来做到这一点更快:
I made a jsFiddle to do just this, just put your CSV test in the
HTML
box and run the script. The content that you would paste into a TracWiki page would be in theResult
box then.In case something happens to the jsFiddle, here is the JavaScript I used (I probably didn't need to use jQuery, but it was faster for me then to have to think of the non-jQuery way to do it:
我的 Shan Carter 先生数据转换器端口现在支持您指定的格式的 Wiki。您可以复制并直接从 Excel 或 CSV 文件粘贴。
http://thdoan.github.io/mr-data-converter/
更新:我在“Trac”选项下添加了 Trac 特定的格式。
My port of Shan Carter's Mr. Data Converter now supports Wiki in the format you specified. You can copy & paste directly from Excel or from a CSV file.
http://thdoan.github.io/mr-data-converter/
UPDATE: I've added Trac-specific formatting under the "Trac" option.