Rails 生成 Excel 的时候,单元格能设置下拉可选则吗?

syj121 · March 23, 2020 · Last by lionzixuanyuan replied at March 31, 2020 · 2762 hits

可以用 axlsx 这个 gem,我当年抄的下拉框代码 https://gist.github.com/bradland/4228336

如果是用 rubyXL 这个 gem,下拉框代码是 https://github.com/weshatheleopard/rubyXL/issues/340

可以准备一个 Excel 模板,在模板中构造好你需要的下拉选项

You need to Sign in before reply, if you don't have an account, please Sign up first.