Questions tagged [spreadsheetlight]

SpreadsheetLight is an open source Open XML spreadsheet library for .NET Framework written in C#, and is released under the MIT License.

SpreadsheetLight is an open source Open XML spreadsheet library for .NET Framework written in C#, and is released under the MIT License.

You can create new Open XML spreadsheets, or work with existing Open XML spreadsheets that are compatible with Microsoft Excel 2007/2010/2013 and LibreOffice Calc.

Links

Website

Tutorials

62 questions
7
votes
4 answers

How to ensure that the OpenXml assembly doesn't cause a conflict with SpreadsheetLight?

I Nugot SpreadsheetLight. To subsequently use it, I need to add the following usings: using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Spreadsheet; using SpreadsheetLight; For the first two ("DocumentFormat") to be recognized, I needed to…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
7
votes
2 answers

Row count with SpreadsheetLight

I'm looking for a function similar to DataTable.Rows.Count that can be used with an SLDocument to find out how many rows have data in them. Is there something available in SpreadsheetLight? Any other methods of achieving this? -Brendan
Brendan Gates
  • 103
  • 1
  • 5
4
votes
5 answers

Error message "entries cannot be opened multiple times in update mode." in Spreadsheet Lite SaveAs function

Upon execution of the dBWorksheet.SaveAs(xlsFileSpec), in the code below, I am seeing an exception: "entries cannot be opened multiple times in update mode." SLDocument dBWorksheet = new SLDocument(); TimeSpan interval = new…
Doug Kimzey
  • 1,019
  • 2
  • 17
  • 32
4
votes
3 answers

Reading Row Data from a spreadsheet

Using the tools SpreadSheetLight I cant find how to read the rows of a spreadsheet file. Specificly Sheet 1. Two problems Im having is There is no way that I can see to get the Rows There is no way that I can see to get the Column Index Here is my…
IEnumerable
  • 3,610
  • 14
  • 49
  • 78
4
votes
2 answers

Install Open XML 2.0

I'm trying to use spreadsheetlight to write to excel file, but apparently spreadsheetlight uses XML 2.0 and I have 2.5 installed. I've unistalled the 2.5 version and have added the 2.0 reference to my project, but I still get an error message…
user2950764
  • 211
  • 4
  • 13
3
votes
1 answer

How to loop through unknown worksheet names in a workbook using the SpreadsheetLight Library

I'm trying to loop through unknown worksheet names in a workbook using the SpreadsheetLight Library. Using the SLDocument sl = new SLDocument("ModifyExistingSpreadsheetOriginal.xlsx", "Sheet1") statement in the examples only allows a string input…
Brendan Gates
  • 103
  • 1
  • 5
3
votes
1 answer

SpreadsheetLight working with multiple worksheets

I am using SpreadsheetLight to write log files from a WinForms project. My intent is to write log entries to three worksheets in the same file, and I really want to avoid using Interop if I can avoid it. I start with a template file made in Excel…
Adam Hoffman
  • 109
  • 1
  • 14
2
votes
1 answer

Spreadsheetlight: Border around cell range, no internal borders

Using SpreadsheetLight I want to add a border (only) around a cell range. There shouldn't be any borders inside that range. What I want: What I get: Code I used: var testDoc = new SLDocument(); var testStyle =…
MilConDoin
  • 734
  • 6
  • 24
2
votes
1 answer

How do I select which series to display in an Excel chart with SpreadsheetLight?

I'm using SpreadsheetLight to build an Excel file with charts. I've got a chart based on a range of data in the Excel file, but I only want to include the data from one of the columns in the chart. In Excel itself, I can do this in the Select Data…
Brian Sullivan
  • 27,513
  • 23
  • 77
  • 91
2
votes
1 answer

NPOI not being able to evaluate formula when excel file is generated

I have created excel file from data table using NPOI library. Excel file is created but formula is not evaluated. This is first time i am using NPOI lib. After lot of google search i found few code snippet which i used in my code to evaluate formula…
T_Zacks
  • 101
  • 2
  • 17
2
votes
0 answers

SpreadSheetLight Column chart

I'm trying to create a column chart using the SpreadSheetLight library. Here is my code using System; using SpreadsheetLight; using SpreadsheetLight.Charts; namespace TestSpreadSheetLight { class Program { static void Main(string[]…
r00xus
  • 79
  • 6
2
votes
1 answer

How to split worksheets into separate workbooks using c# // how to copy entire worksheet with EPPLus

Trying to tackle a lot of new tools at once, attempting to split each worksheet in a .xlsx file into individual workbooks. Is there a simple way to copy the entire worksheet (including images/lines) with spreadsheetlight or EPPlus? If direct…
TSga
  • 191
  • 1
  • 8
2
votes
1 answer

Extension methods and lambda expressions

I am using the spreadsheetlight library to access excel files. How can I shorten the following construct through extension methods and lambda expressions ? I want to count all cells with boolean values. Dictionary>…
Ron
  • 85
  • 5
2
votes
1 answer

How can PivotTables be created using SpreadsheetLight?

I have found the creation of PivotTables using Excel Interop to be possible, but just barely. I'm experimenting with SpreadsheetLight now, hoping that it might be easier, not just for the basics of .xlsx generation, but fancier things such as the…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
2
votes
0 answers

Spreadsheetlight save as working too slow

I am working on a winform with spreadsheetlight library.I want to create a excel file with specific name under a specific folder when user clicked on "Save to Excel" button. Ihave tried the below code so far. string path =…
Harun Yılmaz
  • 96
  • 1
  • 11
1
2 3 4 5