Skip to content

Commit f3d9b2f

Browse files
dessyordanovaKB BotYoanKar
authored
New kb resolving excel file corruption warning after spreadprocessing export 4ff164b217d040fe99776a1932e89ed9 (#638)
* Added new kb article resolving-excel-file-corruption-warning-after-spreadprocessing-export * polished * Update resolving-excel-file-corruption-warning-after-spreadprocessing-export.md * Update resolving-excel-file-corruption-warning-after-spreadprocessing-export.md * Update xlsxformatprovider.md * Update resolving-excel-file-corruption-warning-after-spreadprocessing-export.md * Revert "Update resolving-excel-file-corruption-warning-after-spreadprocessing-export.md" This reverts commit 92dfecf. * Discussed with Yoan the whole case and reverted the code as it was --------- Co-authored-by: KB Bot <[email protected]> Co-authored-by: Yoan Karamanov <[email protected]>
1 parent a59b2fc commit f3d9b2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

knowledge-base/resolving-excel-file-corruption-warning-after-spreadprocessing-export.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ticketid: 1695962
1919

2020
Exporting an Excel file using Telerik [SpreadProcessing]({%slug radspreadprocessing-overview%}) shows a corruption warning when opening the file in Excel.
2121

22-
This issue occurs when reusing the same `MemoryStream` for both import and export operations without resetting or truncating the stream. The issue originates in version 2025.2.520, where `Telerik.Zip` was replaced with `System.IO.Compression`.
22+
This issue occurs when **reusing** the same `MemoryStream` for both import and export operations without resetting or truncating the stream. The issue originates in version 2025.2.520, where `Telerik.Zip` was replaced with `System.IO.Compression`.
2323

2424
This knowledge base article shows how to fix the "Excel found unreadable content" error after export.
2525

@@ -32,9 +32,9 @@ To ensure the exported files are not corrupted, reset or truncate the `MemoryStr
3232

3333
```csharp
3434
XlsxFormatProvider formatProvider = new XlsxFormatProvider();
35-
using (Stream memoryStream = new FileStream("path to your document", FileMode.Open))
35+
36+
using (Workbook workbook = formatProvider.Import(memoryStream))
3637
{
37-
Workbook workbook = formatProvider.Import(memoryStream)
3838
memoryStream.SetLength(0); // Truncate stream to remove previous content
3939
memoryStream.Position = 0; // Reset position to start
4040
formatProvider.Export(workbook, memoryStream);

0 commit comments

Comments
 (0)