• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

tamc/excel_to_code: Roughly translate some Excel spreadsheets to Ruby or C.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

tamc/excel_to_code

开源软件地址:

https://github.com/tamc/excel_to_code

开源编程语言:

Ruby 65.1%

开源软件介绍:

Excel to Code

Tests Passing

excel_to_c - roughly translate some Excel files into C.

excel_to_ruby - roughly translate some Excel files into Ruby.

This allows spreadsheets to be:

  1. Embedded in other programs, such as web servers, or optimisers
  2. Without depending on any Microsoft code

For example, running these commands turns this spreadsheet into this Ruby code or this C code.

Install

Requires Ruby. Install by:

gem install excel_to_code

Run

To just have a go:

excel_to_c <excel_file_name>

This will produce a file called excelspreadsheet.c

For a more complex spreadsheet:

excel_to_c --compile --run-tests --settable <name of input worksheet> --prune-except <name of output worksheet> <excel file name> 

See the full list of options:

excel_to_c --help

Gotchas, limitations and bugs

  1. No custom functions, no macros for generating results
  2. Results are cached. So you must call reset(), then set values, then read values.
  3. It must be possible to replace INDIRECT and OFFSET formula with standard references at compile time (e.g., INDIRECT("A"&"1") is fine, INDIRECT(userInput&"3") is not.
  4. Doesn't implement all functions. See which functions are implemented.
  5. Doesn't implement references that involve range unions and lists (but does implement standard ranges)
  6. Sometimes gives cells as being empty, when excel would give the cell as having a numeric value of zero
  7. The generated C version does not multithread and will give bad results if you try.
  8. The generated code uses floating point, rather than fully precise arithmetic, so results can differ slightly.
  9. The generated code uses the sprintf approach to rounding (even-odd) rather than excel's 0.5 rounds away from zero.
  10. Ranges like this: Sheet1!A10:Sheet1!B20 and 3D ranges don't work.

Report bugs: https://github.com/tamc/excel_to_code/issues

Changelog

See Changes.

License

See License

Hacking

Source code: https://github.com/tamc/excel_to_code

Documentation:

Some notes on how Excel works under the hood:




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mirakonta/lmic: LoRaMAC in C / LoRaWAN in C发布时间:2022-04-17
下一篇:
calccrypto/OpenPGP: A C++ Implementation of RFC 4880发布时间:2022-04-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap