Import Excel file and map it to a form

Posted by: chst8937 on 22 January 2025, 1:20 am EST

  • Posted 22 January 2025, 1:20 am EST - Updated 22 January 2025, 2:19 am EST

    Hello,

    I use C# ASP.NET for my page, and I need to work with existing Excel files.

    Does the Spread.NET provide a functions which are importing an Excel file, such as qwer.xlsx, and mapping it to a specific form?

    I want to upload the Excel file, and save it as a form(methods, db or something… just save form and use it by code). And later, use the saved form and just change content by getting data from a database.

    For example,



    here is my Sample, and I use this format as a form. If I upload file and click save button, this becomes one of frame.

    And later, I want to call this frame and change only title, content, price, total.

    Does it supported?

    Or should I use SpreadJS or ActiveReports?

    Thank you.

  • Posted 22 January 2025, 8:44 am EST

    Hi,

    As per our understanding, you are trying to load an excel file that contains the template to store the data, and you want a way to store its content somewhere. To provide a more specific solution in this case, we kindly request the following additional details:

    1. The excel file that you are trying to load.
    2. How exactly you will add the content to it once it’s loaded into the FpSpread control.
    3. You can create a data model based on the fields in the template and use a collection of those objects to load data into the control. For a more precise solution, it would be helpful if you could explain in detail, if there is some specific way you want the data to be saved and retrieved in the control.

    As for your question about using SpreadJS or ActiveReports, we recommend SpreadJS. It offers better performance than Spread.NET for ASP.NET, and Spread.NET for ASP.NET is no longer actively developed. If you can use SpreadJS in your project, it would be a good choice.

    Here is the documentation link for SpreadJS for your reference: https://developer.mescius.com/spreadjs/docs/overview

    Thanks & Regards,

    Aastha

  • Posted 22 January 2025, 7:59 pm EST - Updated 23 January 2025, 3:11 am EST

    Hello,

    Thank you for the recommendation.

    By your recommendation, Spread.NET is only being developed for WinForms now, and ASP.NET is no longer being developed, right?

    And,

    1. Here is my sample file.

      sample template.zip

    2. To explain the entire process of what I’m trying to do:

      When I click a button next to a name or number, I want to find which template to use for that specific name or number and load it onto the screen. The template contains fixed contents based on the name or number. Then, I want to fetch and load the changed contents from the database according to the date, using DTOs, Lists, or loops. I’m currently using MSSQL.

    Does this explanation suffice? If you need more information, please let me know.

    • Or Can I convert excel file to json(not only data but whole frame like merged cells, colored cells…) and convert json to excel again with SpreadJS?

    Thank you.

  • Posted 24 January 2025, 7:26 am EST

    Hi,

    Thanks for the explanation.

    Spread.NET is only being developed for WinForms now, and ASP.NET is no longer being developed, right?

    For ASP.NET, this product is under maintenance mode. This means that no new features will be added to this product for enhancement. Its newer build versions will only include bug fixes.

    Regarding your concern on how to achieve the required behavior in SpreadJS, you can refer to the following two features:

    I. Data Range: https://developer.mescius.com/spreadjs/docs/features/worksheet/worksheet-data-range

    Demo: https://developer.mescius.com/spreadjs/demos/features/data-range/basic/purejs

    II. Cell Level Binding: https://developer.mescius.com/spreadjs/docs/features/binding/bindcells

    Demo: https://developer.mescius.com/spreadjs/demos/features/data-binding/cell-level-binding/purejs

    You can opt for the use-case that suits your requirement better.

    Or Can I convert excel file to json(not only data but whole frame like merged cells, colored cells…) and convert json to excel again with SpreadJS?

    Yes, you can convert excel to SSJSON format and vice-versa [Note: SSJSON is SpreadJS specific file type based on JSON data] and it stores the data of whole workbook or worksheet, not a specific range.

    Please note that SpreadJS is a JavaScript-based web application and does not support .NET. We recommend keeping this in mind before proceeding.

    Additionally, if you have more questions about SpreadJS, you can ask them on its dedicated forum: https://developer.mescius.com/forums/spreadjs

    Thanks & Regards,

    Aastha

  • Posted 2 February 2025, 10:04 pm EST

    Thank you. It helped me.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels