Quantcast
Channel: npoi Discussions Rss Feed
Viewing all articles
Browse latest Browse all 637

New Post: XLSX to XLS style problem

$
0
0
Hello,

When I save a xlsx as in xls format and open with NPOI, HSSFWorkbook. Style are dissappeared in saved xls file.

Here is my Code

using (FileStream f = new FileStream(file, FileMode.Open, FileAccess.ReadWrite))
{
                IWorkbook wb = WorkbookFactory.Create(f);

                //wb = new HSSFWorkbook(wb);

                maskXLSWorkbook(wb);

                newFileName = outputFolderName + "\\" + maskId + "_" +Path.GetFileName(file);
using (FileStream stream = new FileStream(newFileName, FileMode.Create, FileAccess.ReadWrite))
{
          try
          {
                 wb.Write(stream);
            }
           catch {

                    }
             }
}

Viewing all articles
Browse latest Browse all 637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>