Closed XML.Reports Function app file not saving

Archive1 20 Reputation points
2025-02-02T19:26:01.4633333+00:00

I'm trying to write a function app which generates a report using ClosedXML.Reports. The output template is quite simple and only uses the summaryabove template. The function app is able to create a text file and save it to blob storage successfully. But when I try to get it to create a file using ClosedXML.Reports to save to blob storage it fails in the file generation stage. I've not seen many examples online which use ClosedXML.Reports with a function app to save to blob storage, so I'm not sure exactly where I'm going wrong. The template file is being uploaded to Azure as part of the package when I publish from VSCode and I'm only testing in Azure portal using test and run along with log stream messages to understand what's happening internally. Is anyone able to help?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,411 questions
{count} votes

Accepted answer
  1. Loknathsatyasaivarma Mahali 430 Reputation points Microsoft Vendor
    2025-02-11T15:15:01.7833333+00:00

    Hello @Archive1,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    The solution involved here is that template doesn't need a range or name defined in Excel, it just needs a cell with {{HeaderField}} in plain text and it replaces it as expected.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue. 

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.