Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
ドキュメントをある形式から別の形式に変換することは、Aspose.Words の主力機能です。利用可能な ロードフォーマット のドキュメントを XLSX 形式に変換することもできます。
ドキュメントを XLSX に変換するプロセスはかなり複雑です。 Aspose.Words を使用してドキュメントを XLSX 形式で保存するには、XlsxSaveOptions クラスと SaveFormat 列挙の新しい Xlsx 要素を使用します。前述したように、Aspose.Words でサポートされている任意のロード形式でドキュメントを XLSX に保存できます。
次のコード例は、PDF を XLSX に保存する方法を示しています。
doc = aw.Document(docs_base.my_dir + "Pdf Document.pdf")
doc.save(docs_base.artifacts_dir + "BaseConversions.PdfToXlsx.xlsx")また、Aspose.Words を使用すると、ドキュメント内で特定の文字列または正規表現を検索し、必要な一致する文字列または正規表現に置き換えることができます。その後、結果を XLSX 形式で保存することもできます。
次のコード例は、検索と置換操作を実行し、結果を XLSX に保存する方法を示しています。
from aspose.words import Document, DocumentBuilder
from aspose.words.replacing import FindReplaceOptions
doc = Document()
builder = DocumentBuilder(doc)
builder.writeln("Ruby bought a ruby necklace.")
# We can use a "FindReplaceOptions" object to modify the find - and -replace process.
options = FindReplaceOptions()
# Set the "match_case" flag to "True" to apply case sensitivity while finding strings to replace.
# Set the "match_case" flag to "False" to ignore character case while searching for text to replace.
options.match_case = True
doc.range.replace("Ruby", "Jade", options)
doc.save(ARTIFACTS_DIR + "BaseConversions.FindReplaceXlsx.xlsx")CompressionLevel プロパティを使用して保存時に圧縮レベルを指定することもできます。
次のコード例は、XLSX 形式で保存するときに圧縮レベルを指定する方法を示しています。
from aspose.words import Document
from aspose.words.saving import XlsxSaveOptions, CompressionLevel
doc = Document(MY_DIR + "Document.docx")
saveOptions = XlsxSaveOptions()
saveOptions.compression_level = CompressionLevel.MAXIMUM
doc.save(ARTIFACTS_DIR + "BaseConversions.CompressXlsx.xlsx", saveOptions)Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.