我有這個創建行動使用的docx寶石和msworddoc-提取寶石 if @subject.save
if @subject.odoc.present?
@odoc_url = @subject.odoc.url
if File.extname(URI.parse(@odoc_url).path) == ".docx"
@subject.homework
我想在保留文檔結構的同時從Word文檔中提取文本內容。 This question最接近並提供起點。 Here is a dummy word document.我已經解壓縮,幷包括以下document.xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:wpc="http://schema