Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
تبدیل اسناد از یک فرمت به فرمت دیگر از ویژگی های شاخص Aspose.Words است. می توانید اسناد را در هر فرمت بارگذاری موجود نیز به فرمت XLSX تبدیل کنید.
تبدیل یک سند به XLSX یک فرآیند نسبتاً پیچیده است. برای ذخیره سند خود در قالب XLSX با استفاده از Aspose.Words، از کلاس XlsxSaveOptions و عنصر Xlsx جدید در شمارش SaveFormat استفاده کنید. همانطور که در بالا ذکر شد، می توانید سند را در هر فرمت بارگیری که توسط Aspose.Words پشتیبانی می شود در XLSX ذخیره کنید.
مثال کد زیر نحوه ذخیره PDF در XLSX را نشان می دهد:
Document doc = new Document(MyDir + "Pdf Document.pdf");
doc.Save(ArtifactsDir + "BaseConversions.PdfToXlsx.xlsx")
همچنین با استفاده از Aspose.Words، میتوانید یک رشته یا عبارت معمولی را در سند خود پیدا کنید و آن را با عبارت مورد نیاز خود جایگزین کنید. سپس می توانید نتیجه را در قالب XLSX نیز ذخیره کنید.
مثال کد زیر نحوه انجام عملیات Find و جایگزینی و ذخیره نتیجه در 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.MatchCase = true;
doc.Range.Replace("Ruby", "Jade", options);
doc.Save(ArtifactsDir + "BaseConversions.FindReplaceXlsx.xlsx");
همچنین می توانید سطح فشرده سازی را هنگام ذخیره با استفاده از ویژگی CompressionLevel مشخص کنید.
مثال کد زیر نحوه تعیین سطح فشرده سازی هنگام ذخیره در فرمت XLSX را نشان می دهد:
Document doc = new Document(MyDir + "Document.docx");
XlsxSaveOptions saveOptions = new XlsxSaveOptions();
saveOptions.CompressionLevel = CompressionLevel.Maximum;
doc.Save(ArtifactsDir + "BaseConversions.CompressXlsx.xlsx", saveOptions);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.