Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Konwersja dokumentów z jednego formatu do innego jest flagową cechą Aspose.Words. Można przekonwertować dokumenty w dowolnym dostępnym Format postępowania również do formatu XLSX.
Konwersja dokumentu na XLSX jest raczej skomplikowanym procesem. Aby zapisać dokument do formatu XLSX za pomocą Aspose.Words, > stosować XlsxSaveOptions klasa i nowy Xlsx element SaveFormat wyliczenie. Jak wspomniano powyżej, można zapisać dokument w dowolnym formacie obciążenia obsługiwanym przez Aspose.Words do XLSX.
Poniższy przykład kodu pokazuje jak zapisać PDF do XLSX:
Document doc = new Document(getMyDir() + "Pdf Document.pdf");
doc.save(getArtifactsDir() + "BaseConversions.PdfToXlsx.xlsx");Również przy użyciu Aspose.Words, w dokumencie możesz znaleźć określony ciąg znaków lub wyrażenie regularne i zastąpić je tym, którego potrzebujesz. Następnie można zapisać wynik do formatu XLSX.
Poniższy przykład kodu pokazuje jak wykonać operację wyszukiwania i wymiany i zapisać wynik do XLSX:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("Ruby bought a ruby necklace.");
// We can use a "FindReplaceOptions" object to modify the find-and-replace process.
FindReplaceOptions options = new FindReplaceOptions();
// Set the "MatchCase" flag to "true" to apply case sensitivity while finding strings to replace.
// Set the "MatchCase" flag to "false" to ignore character case while searching for text to replace.
options.setMatchCase(true);
doc.getRange().replace("Ruby", "Jade", options);
doc.save(getArtifactsDir() + "BaseConversions.FindReplaceXlsx.xlsx");Możesz również określić poziom kompresji podczas zapisywania przy użyciu CompressionLevel nieruchomości.
Poniższy przykład kodu pokazuje jak określić poziom kompresji podczas zapisywania do formatu XLSX:
Document doc = new Document(getMyDir() + "Document.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
saveOptions.setCompressionLevel(CompressionLevel.MAXIMUM);
doc.save(getArtifactsDir() + "BaseConversions.CompressXlsx.xlsx", saveOptions);Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.