Open kunalcjadhav opened 7 months ago
By default, a new worksheet in ReoGrid is initialized with 200 rows and 100 columns. Given your text file has 400 rows, you'll need to explicitly set the number of rows in your target worksheet to accommodate all the data from your file before loading the data.
worksheet.Resize(400, 74);
Yes, this helps, Thank you @jingwood but now I end up in new error in later part of code. While writing data in my target excel file which is .xlsx file that contains Pivot tables using this data. After loading data in Excel Sheet, if I open Excel file Excel complains
If I select Yes, it deletes all existing Pivot tables and only retains 1 blank sheet and target sheet with data in the same.
Does this saving is not possible in ReoGrid, were only data is loaded, or it is related to option used grid.Save(excelFilePath, unvell.ReoGrid.IO.FileFormat.Excel2007); is breaking original sheet. Is there any available way out?
Thanks in advance.
I can't help without more information about the error. If possible can you please share the Excel file?
I use GeoGridControl. The Load () method loads excel file to GeoGridControl control, prompt System. ArgumentOutOfRangeException:"
Description
I am a new coder in C#, I am using ReoGrid dll to read a text file and load it in a target Excel sheet. The test text file, I am using has about 400 rows and 74 columns and I am using semicolons as column separators in a text file. I am getting an error on row 201 of my data, in the section " // Load the data into the worksheet" to load the data part to the grid.
I am creating a console app in .net framework 4.8
using System; using System.Globalization; using System.IO; using unvell.ReoGrid; using unvell.ReoGrid.IO;
namespace LoadTextFiletoExcelSheet { internal class Program { static void Main(string[] args) {
}
To Reproduce
I am getting an error on row 201 of my data, I am creating a console app in .net framework 4.8
Screenshots
Edition
Environment
Windows 10 OS: English I would also like to use this tool in Chinese machines