We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ODS format not saving borders style

I am using Aspose.Cells v16.11.0 available on nuget in c# console application with .NET 4.5.1.

My task is to convert xlsx file into ODS file. I am using below code snippet

Workbook wb = new Workbook(@“C:\temp.xlsx”);

xlsx file contains one sheet with dotted border around cells. But when I open the generated ods file, it does not have dotted border line. Rather it is converted to solid border line.
How can i ensure that formatting in xlsx (atleast border) remain as it is in ODS?

I tried to use other method also like using OdsSaveOptions in WorkBook.Save method, but also did not help.
If i save ods file from MS office excel software directly, it retains dotted border in ods file.

Hi there,

Thank you for contacting Aspose support.

First of all, please note that the latest version of Aspose.Cells for .NET is 16.12.0 which is also available at NuGet. Please try the scenario against the latest version. In case the problem persists, please share the input spreadsheet so we could perform tests on our side and share our feedback.

Thanks Babar for prompt response. I installed latest version only from nuget via command -

install-package aspose.cells

Though on nuget site, it is showing version 16.12.0, in packages.config file in VS, it is showing version 16.11.0 only.

on nuget website - https://www.nuget.org/packages?q=aspose.cells, it shows version 16.11.0.
if you drill down, it shows version 16.12.0 (https://www.nuget.org/packages/Aspose.Cells/) which is strange

Do you still have latest version which I can try on some other nuget repo?

Hi again,

The Nuget website shows that Aspose.Cells package has not been indexed yet, that could be causing the said problem. You can try updating the package from the Visual Studio interface by selecting Tools > Nuget Package Manger > Manage Nuget Packages for Solution… In Updates tab, you will see that there is an update available for Aspose.Cells API.

Anyway, you can get the latest major release from Aspose download section or try the most recent minor release as attached.

Thanks for the link. I have downloaded 16.12 from download section of Aspose. However result is same. The border formatting is lost when saving in ods.

Steps to reproduce.

  1. Create new xlsx file vis ms office

  2. type some value in cell A1. Apply dotted border around it. Save the xlsx file.

  3. Open this xlsx file in .NET using aspose.cell
    Workbook wb = new Workbook(@“C:\temp.xlsx”);

  4. Save it using aspose.

  5. Open generated ods file in ms office, observe the border, it is not the one which is available in xlsx file.

Hi there,

Thank you for sharing the steps to replicate the issue. I have tried the scenario by creating a XLSX spreadsheet as directed and converted it to ODS with Aspose.Cells for .NET 16.12.5 to reproduce the problem on my side. I can see that the dotted borders set in XLSX are converted to solid lines in ODS file.

That said, I have further checked the case in OpenOffice Calc application by loading the source XLSX. I have noticed that Calc application renders the dotted borders in solid, furthermore there isn’t any option to manually set the borders to dotted lines. I believe this is the limitation of ODS format that it cannot show the dotted borders, even in OpenOffice which is the native application for OpenDocument formats such as ODS. Could you please check these findings on your side as well?

Unfortunately, I am not allowed to download OpenOffice app.

Can you try below thing -

  1. Open that xlsx file in MS office excel.
  2. Save it as Ods file (There is an option to save it as ODS)
  3. Now try to open ods file in MS office. you will see that dotted lines are retained in ODS file as well.

Hi there,

Thank you for the feedback.

I have tried the conversion with Excel, and I am able to notice that Excel application is able to maintain the dotted borders in ODS format. Based on this fact, I have raised an investigative ticket (CELLSNET-45027) for the product team’s review. Please spare us little time to further analyze the scenario and revert back with updates in this regard.


This is to inform you that the ticket logged earlier as “CELLSNET-45027” has been marked resolved. We will soon share the fix here for your testing after performing QA and including other enhancements and fixes.

Thank you.

Please try our latest version/fix: Aspose.Cells for .NET v16.12.7:

Your issue should be fixed in it.

Let us know your feedback.

Thank you

Thanks Amjad for providing new version.
I’ll test this version and provide feedback.

The issues you have found earlier (filed as CELLSNET-45027) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

I have tested both versions - 16.12 and 17.1. I can see issue still persists. Dotted borders are not appearing in ODS file,
Rather it is replaced with solid line.

My code is very simple as below-
Workbook wb = new Workbook(@"C:\\temp.xlsx");

If i open generated ODS file in MS excel, i can see dotted line is replaced with solid line.

Do you have working sample code to share with me?

Hi there,

Please note, your code to convert the XLSX to ODS format is correct. Moreover, the latest version of Aspose.Cells for .NET 17.1.1 passes the test against the sample attached in this thread. If you are not getting the desired results, we recommend you to first try the scenario against the latest release. In case the problem persists, please share your input XLSX file here for further investigation.