How to generate Excel files with low-code

Reading time: 5 minutes

Excel is widely used in different businesses and is a crucial element in the analysis and distribution of data. When generating reports, merging data from multiple sources or creating a document for a particular purpose, a low-code platform can provide consistent outcomes with less effort than the traditional coding approach.

With Linx, for instance, you can craft an Excel file from any data source, e-mail it to a designated user, and then archive it for future reference. The process and the related logic are entirely up to you, and you can even arrange for it to run at specific times, e.g., month-end.

Creating an Excel file in low-code

The Excel plugin allows you to open, read and write from an Excel file. When creating an Excel file, you have two options. 

  • Create an empty Excel file: This option creates a new blank Excel file with no formatting.
  • Create an Excel file from a pre-configured template. This will create a copy from a template and will start adding rows to that template. 

Data that will be populated into the Excel file can come from any data source or a combination of multiple data sources:

Once data is imported, you will use the ExcelWrite function to write the data to a new Excel file by mapping the retrieved values to their relevant fields, illustrated below:

Create Excel files by mapping field values

The above process retrieves data from a table in a Microsoft SQL* Server database and then writes that data to an Excel file.

Read more: Working with database in Linx

Once the file is generated, it will have the formatting of the template with the data pulled from your data source.

Good interactions

Linx, a backend platform, has many file-related features, allowing you to combine your file generation with functionality such as emailing, file movement and management or scheduling. With other functionality, you can create comprehensive processes to automate the business process or repetitive tasks. 

Emailing the created file

Attach a file to an email and then send it to users using the Send Email function. The emails will be sent to the SMTP server and distributed to the recipients. It is also possible to get the email configuration, such as the email address to which the report should be sent, from another data source within your business. And to add more granularity, you can easily add logging to the procedure to record when the email was sent and who it was sent to.

Send a generated excel file via Email

Archiving the created file

You can archive the file that was created into a specific archive structure. The file can be zipped to make it smaller if disk space is challenging. Linx will do file and folder management based on your configuration. You can also check if files exist, create directories, trigger events based on when a file is dropped in a folder and more.

Archive a file with low-code

Creating the file on a schedule

If you would like to initiate a timed process according to a predetermined schedule, a Timer Service can be utilized. The timer can be used to activate a Function, or a combination of functions, at a specified time or frequency. For example, we can configure the timer to initiate our function after each month, but it also can run once a day or once a week if that is necessary.

Creating the file on a schedule

Once you set up the timer, you can upload your solution on a Linx server where it will be hosted. The Linx server will execute the function at a specified time. The Linx server will host the application, providing a monitoring dashboard and logs for the execution of your solution.

Sign up to our Newsletter