{"id":22343412,"url":"https://github.com/datajuggler/excelerate","last_synced_at":"2025-09-15T00:07:11.628Z","repository":{"id":63045415,"uuid":"406104270","full_name":"DataJuggler/Excelerate","owner":"DataJuggler","description":"Nuget package DataJuggler.Excelerate uses NOIP and it makes it easy to load and save Excel data, code generate C# classes from header rows and more.","archived":false,"fork":false,"pushed_at":"2025-08-02T19:07:14.000Z","size":1594,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T01:51:31.700Z","etag":null,"topics":["csharp","excel"],"latest_commit_sha":null,"homepage":"https://excelerate.datajuggler.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataJuggler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-13T19:33:11.000Z","updated_at":"2024-12-02T22:42:36.000Z","dependencies_parsed_at":"2024-01-14T21:57:42.158Z","dependency_job_id":"0ff93330-dae7-4286-b094-abc94e9591e6","html_url":"https://github.com/DataJuggler/Excelerate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DataJuggler/Excelerate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataJuggler%2FExcelerate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataJuggler%2FExcelerate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataJuggler%2FExcelerate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataJuggler%2FExcelerate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataJuggler","download_url":"https://codeload.github.com/DataJuggler/Excelerate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataJuggler%2FExcelerate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275185399,"owners_count":25419919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","excel"],"created_at":"2024-12-04T08:16:02.187Z","updated_at":"2025-09-15T00:07:11.579Z","avatar_url":"https://github.com/DataJuggler.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg height=192 width=192 src=https://github.com/DataJuggler/Blazor.Excelerate/blob/main/wwwroot/Images/ExcelerateLogoSmallWhite.png\u003e\n\nUpdate 1.14.2024: New Video - Import a Cities Database in Excel to SQL Server: https://youtu.be/6LsFP0puuyA\n\nHere is a short video:\nhttps://youtu.be/mj1h4_IRAQQ\n\nLive demo:\nhttps://excelerate.datajuggler.com\n\nAnother very useful project built with Excelerate is:\n\nNuget package DataJuggler.SQLSnapshot.\n\nExport an entire SQL Server database including all data rows to Excel with one line of code, passing in a connectionstring and a path to save.\n\nSource Code\nhttps://github.com/DataJuggler/SQLSnapshot\n\nSQL Snapshot Desktop\nhttps://github.com/DataJuggler/DemoSQLSnapshot\nA Winforms app using SQL Snapshot.\n\nStudy the code in SQL Snapshot. I wrote SQL Snapshot in 1 day, with a few updates later. That is the power of DataJuggler.Net7 for SQL Server schema reading and data loading and using DataJuggler.Excelerate to write out the data rows to Excel.\n\nLatest version is of Excelerate is 7.2.12 and has over 23,000 Nuget installs. \n\nA class named CodeGenerator was just created, and now by inheriting from the same CSharpClassWriter that code generates for DataTier.Net, I code generate\nclasses based on your header row.\n\nI have a couple of clients that I build programs that automate combining columns from multiple Worksheets to form reports.\n\nRather than continue to write custom loaders, I really only need custom Exporters in most cases.\n\nHere is a short video:\nhttps://youtu.be/Sa-xroxPw_I\n\nThis short code snippet will load all the rows from a worksheet:\n\nSnippet is from a Windows Form .Net 5 project, located in the Sample folder of this project. Very simple for now:\n\n# Load Worksheet Sample\n\n    using DataJuggler.UltimateHelper;\n    using DataJuggler.Excelerate;\n    using System;\n    using System.Windows.Forms;\n\n    // Set the text\n    string path = WorksheetControl.Text;\n\n    // Create a new instance of a 'LoadWorksheetInfo' object.\n    LoadWorksheetInfo loadWorksheetInfo = new LoadWorksheetInfo();\n\n    // Set the SheetName\n    oadWorksheetInfo.SheetName = SheetnameControl.SelectedObject.ToString();\n\n    // Only load the first 12 columns for this test\n    loadWorksheetInfo.ColumnsToLoad = 12;\n\n    // Set the LoadColumnOptions\n    loadWorksheetInfo.LoadColumnOptions = LoadColumnOptionsEnum.LoadFirstXColumns;\n    \n    // other options\n    // loadWorksheetInfo.LoadColumnOptions = LoadColumnOptionsEnum.LoadAllColumnsExceptExcluded;\n    // loadWorksheetInfo.LoadColumnOptions = LoadColumnOptionsEnum.LoadSpecifiedColumns;\n\n    // load the worksheet\n    Worksheet worksheet = ExcelDataLoader.LoadWorksheet(path, loadWorksheetInfo);\n\n    // if the worksheet exists\n    if ((NullHelper.Exists(worksheet)) \u0026\u0026 (SheetnameControl.HasSelectedObject))\n    {\n        // if the rows collection was found\n        if (worksheet.HasRows)\n        {\n            // Show a message as a test\n            // MessageBox.Show(\"Worksheet Loaded\", \"Finished\");\n\n            // test only\n            // int rows = worksheet.Rows.Count;\n\n            // Show a message as a test\n            // MessageBox.Show(\"There were \" + String.Format(\"{0:n0}\",  rows) + \" rows found in the worksheet\");\n\n            // int cols = worksheet.Rows[1124].Columns.Count;\n\n            // Show a message as a test\n            // MessageBox.Show(\"There were \" + String.Format(\"{0:n0}\",  cols) + \" columns found in the row index 1125.\");\n\n            // Get a nullable date\n            // string columnValue = worksheet.Rows[1124].Columns[3].DateValue;\n\n            // Show a message of the columnValue\n            // MessageBox.Show(\"Column Value: \" + columnValue);\n        }\n    }\n    \n    There is now a Code Generator class built into this project, to code generate a C# class from a header row. \n    The Code Generator has been updated to pass in a Row instance, to make loading the generate classes simple.\n    \n    This code is from a Windows Form .Net 5 project located in the sample:\n    \n    # Code Generation Sample\n    \n        // if the value for HasWorksheet is true\n        if ((HasWorksheet) \u0026\u0026 (ListHelper.HasOneOrMoreItems(Worksheet.Rows)))\n        {\n            // The file I am using to test has 3 rows at the top above the header row. Take this out if I accidently check this in\n            // worksheet.Rows.RemoveRange(0, 3);\n\n            // Set the outputFolder\n            string outputFolder = OutputFolderControl.Text;\n\n            // Set the className (the name of the generated class)\n            string className = \"SalesTaxEntry\";\n\n            // Create a new instance of a CodeGenerator\n            CodeGenerator codeGenerator = new CodeGenerator(worksheet, outputFolder, className);\n\n            // Generate a class and set the Namespace\n            bool success = codeGenerator.GenerateClassFromWorksheet(\"STATS.Objects\");\n\n            // Show the results\n            MessageBox.Show(\"Success: \" + success);\n        }\n    \n    \n    There is another override to load multiple sheets at once. I will build a sample project when I get some time to build a sample spreadsheet I can give away.\n    \n    To load multiple sheets:\n    \n    List\u003cLoadWorksheetInfo\u003e loadWorkSheetsInfo = new List\u003cLoadWorksheetInfo\u003e();\n    \n    // Add each LoadWorksheetInfo\n    workbook = ExcellDataLoader.LoadWorkbook(path, loadWorkSheetsInfo)\n    \n    I will build some helper methods to save writing as much code once I use this a little to know what is needed.\n    \n    \n    \nMy first test loaded a 12 column spreadsheet with 3,376 rows in just a few seconds.\n\nLive Demo\n\nCode Generate C# Classes From Excel Header Rows\nhttps://excelerate.datajuggler.com\n\nNote: \nBlazor Excelerate comes with a sample workbook MemberData.xlsx\n\nRandom Members (20,000)\u003cbr\u003e\nAddresses (20,000)\u003cbr\u003e\nStates (51)\n\nSource Code For Above Site:\n\nBlazor Excelerate\nhttps://github.com/DataJuggler/Blazor.Excelerate\n\n\n\nWorking WinForms Demo\n\nUse Excel As A Backend\nhttps://github.com/DataJuggler/Excelerate.WinForms.Demo\n\nTutorial Practice\n\nStep 1: \n\nGo To Blazor Excelerate\nhttps://excelerate.datajuggler.com\n\nStep 2: Download MemberData.xlsx\n\nStep 3: Click the Upload Excel button and browse for MemberData.xlsx downloaded in Step 1.\n\nStep 4: Set your Namespace name to 'Demo.Objects'\n\nStep 5: Select Members sheet in the ComboBox\n\nStep 6: Click the Generate Class Button.\n\nStep 7: Download the zip file and extract the class Members.cs\n\nStep 8: Repeat Steps 3 - 7 for the Address and States sheets.\n\nNow you have the classes generated that were used to build the Excelerate WinForms Demo\n\nLoading Data\n\nThis method loads all 3 worksheets: (to be continued, building Codopy.com as a code formatter. Site is not live yet).\n\n    /// \u003csummary\u003e\n    /// Load all 3 Lists Names, Addresses and States.\n    /// \u003c/summary\u003e\n    public int LoadAllData()\n    {\n        // initial value\n        int objectsLoaded = 0;\n        \n        // Ensure visible\n        StatusLabel.Visible = true;\n        Graph.Visible = true;\n        \n        // ExcelPath is a relative path: const string ExcelPath =  \"Documents/MemberData.xlsx\";\n        string path = Path.GetFullPath(ExcelPath);\n        \n        // Set the Status\n        StatusLabel.Text = \"Loading data, please wait.\";\n        \n        // Force a refresh here\n        Refresh();\n        Application.DoEvents();\n        \n        // if the path exists\n        if (FileHelper.Exists(path))\n        {\n            // load the workbook\n            Workbook = ExcelDataLoader.LoadAllData(path);\n            \n            // if the workbook exists and has 3 or more shorts\n            if ((NullHelper.Exists(workbook)) \u0026\u0026 (ListHelper.HasXOrMoreItems(workbook.Worksheets, 3)))\n            {\n                // Get the indexes of each sheet\n                membersIndex = workbook.GetWorksheetIndex(\"Members\");\n                addressIndex = workbook.GetWorksheetIndex(\"Address\");\n                statesIndex = workbook.GetWorksheetIndex(\"States\");\n                \n                // verify all sheet indexes were found\n                if ((membersIndex \u003e= 0) \u0026\u0026 (addressIndex \u003e= 0) \u0026\u0026 (statesIndex \u003e= 0))\n                {\n                    // Get the counts\n                    int membersCount = workbook.Worksheets[membersIndex].Rows.Count -1;\n                    int addressesCount = workbook.Worksheets[addressIndex].Rows.Count -1;\n                    int statesCount = workbook.Worksheets[statesIndex].Rows.Count -1;\n                    \n                    // Setup the Graph\n                    Graph.Maximum = workbook.Worksheets[0].Rows.Count + addressesCount + statesCount;\n                    Graph.Value = 0;\n                    \n                    // Force a refresh here\n                    Refresh();\n                    Application.DoEvents();\n                    \n                    // Load the Members\n                    LoadMembers(workbook.Worksheets[membersIndex]);\n                    \n                    // Load the Addresses\n                    LoadAddresses(workbook.Worksheets[addressIndex]);\n                    \n                    // Load the States\n                    LoadStates(workbook.Worksheets[statesIndex]);\n                    \n                    // Set the StatusLabel\n                    StatusLabel.Text = \"All data has been loaded\";\n                }\n            }\n        }\n        \n        // return value\n        return objectsLoaded;\n    }\n    \n\n\nMore helper methods and features have been added. The Nuget package has been released: DataJuggler.Excelerate.\n\nFeel free to mention any new features you think would be useful. I can't promise to do them all, but if it is a good fit for this project I will add it.\n\n** I am available for hire if you need help with any size C# / SQL Server project **\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajuggler%2Fexcelerate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatajuggler%2Fexcelerate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatajuggler%2Fexcelerate/lists"}