Hi team,
Here is my code snippest.
> if (worksheet.Cells.Count > 0)
> {
>
> Aspose.Cells.Range sourceRange = worksheet.Cells.MaxDisplayRange;
> //Create a range with same row and column count as source worksheet
> Aspose.Cells.Range destRange = FAQ.Cells.CreateRange(sourceRange.FirstRow, sourceRange.FirstColumn, sourceRange.RowCount, sourceRange.ColumnCount);
> //Select Paste Options
> PasteOptions options = new PasteOptions();
> options.PasteType = PasteType.Values;
> //Copy the range from source worksheet to destination.
> destRange.Copy(sourceRange, options);
> destRange.ColumnWidth = 60;
> destRange.Worksheet.AutoFitColumn(0);
> destRange.Worksheet.AutoFitColumn(1);
> }
This code work properly at my local windows machine but when I deploy this code on server which is on Linux that time it’s giving me this error at this line.
destRange.Worksheet.AutoFitColumn(0);
destRange.Worksheet.AutoFitColumn(1);
Here is my error
"The type initializer for ‘\u000e\u0003\u000f\u0002’ threw an exception. at \u000e\u0003\u000f\u0002.\u000e\u0005(String \u0002, Single \u0003, FontStyle \u0005)\n at \u0005\u0016\u0010\u0003.\u0006\u0005(String \u0002, Font \u0003, Double \u0005)\n at \u0006\u0019\u0005.\u0002\u0003(Int32 \u0002, Int32 \u0003, Int32 \u0005, Int32 \b, AutoFitterOptions \u0006)\n at \u0006\u0019\u0005.\b(Cells \u0002, Int32 \u0003, Int32 \u0005, Int32 \b, Int32 \u0006, AutoFitterOptions \u000e)\n at Aspose.Cells.Worksheet.AutoFitColumn(Int32 columnIndex)\n "
I’m using Aspose cells 23.0 netstandard2.0 dll for .NetCore 8 project.
Is there any dependency file or other version of file I have to upload on my Linux server.