Converting a excel sheet to golang

polaris · · 381 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello. I have a realy realy big excel sheet that needs to be ported to a web app. I think about using go for this. Any ideas if there is something out there that can be used for this? The sheet has many calculated values, and also some comboxes for selections. Many functions in the Excel-sheet are implemented as macros/vbs. I saw, that go supports google-sheets, so this could be one option, to store the data in there and do the calculations in google-sheet. But i would prefer some solution, where everything is on my server.</p> <hr/>**评论:**<br/><br/>tealeg: <pre><p>It sounds like you&#39;re just going to have to write a web app from scratch. I&#39;m not really sure what you&#39;re after here? Typically you&#39;d just store the data in a database instead of spreadsheet, but honestly it sounds like you&#39;ve not done this kind of work before. If that&#39;s the case your question shouldn&#39;t be &#34;can I do this in go?&#34;, but rather &#34;how to I go about making a data driven web application?&#34;. </p></pre>renemarxis: <pre><p>I&#39;m looking for something like <a href="http://pandas.pydata.org/" rel="nofollow">http://pandas.pydata.org/</a> but for go. And yes, i did some apps that have database access :) for the last 25 years or so ... But i just started go recently, so i am not very familar with the libraries yet.</p></pre>SomniaStellarum: <pre><p>Might be best to extract current data and use something like csv to import it into a new database like (maybe using go) system. Go is general purpose enough to be able to do something like this, however you would be way better off writing it anew. Legacy code has all kinds of issues typically, and excel worksheets are more fragile that most (this is from experience btw). </p> <p>Look at gonum as a tool to make this happen. It&#39;s likely got everything you need. </p></pre>daenney: <pre><p>The only library I&#39;m familiar with is <a href="https://github.com/tealeg/xlsx" rel="nofollow">https://github.com/tealeg/xlsx</a> which lets you read/write XLSX files (so only the &#34;new&#34; Office Open XML based format). W.r.t VB macro&#39;s though, that seems extremely unlikely to work unless you want to build a VB interpreter in Go, similarly w.r.t using formulae.</p></pre>tealeg: <pre><p>I&#39;m actually the author of that library, I don&#39;t think it will be of any use at all in this case - you could obviously use it to have an XLSX file as a &#34;database&#34; for your application, but frankly it&#39;s not an approach I&#39;d advise, and as you correctly summarise, executing the VB macros would be a <em>ahem</em> non-trivial task. </p></pre>TheMagicHorsey: <pre><p>Using Python and Pandas might be a better fit to be honest.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

381 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传