【发布时间】:2020-08-11 15:16:41
【问题描述】:
我有 MS Excel 电子表格,其中有许多带有超链接的单元格。我不想要超链接。相反,我只想使用单元格中的可见文本。如何获得?
这里是示例代码
require 'roo-xls'
ifl = Roo::Spreadsheet.open(ifile)
sheet = ifl.sheet(0)
i = 0
while sheet.cell(i,0) != nil
key = sheet.cell(i,0) # these cells contain hyperlinks, not usual strings
puts key # url is printed here instead of the visible text of the link
i = i + 1
end
【问题讨论】:
-
向我们展示您迄今为止尝试过的代码。
-
在原帖中添加代码