Open Closed

Import Excel file #9313


User avatar
0
antoni.obrados created

Hi everyone,

I've already imported an Excel file using the Abp Boilerplate framework, but I can't figure out how to do it with abp.io. Could you tell me how to do it?

Thanks.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

6 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    We're using MiniExcel library in ABP Suite to export data as excel whenever you generate a code by checking Enable Excel Export option.

    You can use the same library to import too

    public async Task ImportAsync(IRemoteStreamContent file)
    {
        using var stream = file.GetStream();
        var rows = stream.Query<BookExcelDto>().ToList();
    
        var bookList = rows.Select(row => new Book(row.Id, row.Title, row.AuthorName)).ToList();
    
        await _bookRepository.InsertManyAsync(bookList);
    }
    

    You can read this article if you want to learn usage of IRemoteStreamContent and upload a file from angular: https://abp.io/community/articles/how-to-upload-and-download-files-in-the-abp-framework-using-angular-que8cdr8

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    antoni.obrados created

    Thanks for all.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    antoni.obrados created

    Hi,

    When I run swagger it gives me this error:

    Thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hello,

    Can you send us the logs of your application to pinpoint the root cause of the problem?

    You can find the log record in Logs/logs.txt in the Host project.

    Thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    When I run swagger it gives me this error:

    Thanks.

    Do you use a gateway or directly calling the service?

    Also please check logs of the application it provide information about the problem. You can share with us the logs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    antoni.obrados created

    Everything's fine now. It was my mistake. Thanks.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.