logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dsydsy  
#1 Posted : Tuesday, April 28, 2020 4:39:24 PM(UTC)
dsydsy

Rank: Member

Groups: Registered
Joined: 2/15/2019(UTC)
Posts: 10
United States
Location: AZ

Was thanked: 1 time(s) in 1 post(s)
Hello!

I am trying to schedule an existing report to run and export results as an excel file to a shared drive via the Output (Folder Device) option. However, I am unable to figure out how to set the output's file type, if there is the option. We do have the Excel and PDF Converter license. Am I missing something obvious/has anyone been able to do this successfully? Thanks!
epf  
#2 Posted : Tuesday, April 28, 2020 5:11:15 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 205 time(s) in 198 post(s)
the file type is normally automatically added to the file generated (as it depends on the format)...
just make a try.
dsydsy  
#3 Posted : Tuesday, April 28, 2020 7:34:52 PM(UTC)
dsydsy

Rank: Member

Groups: Registered
Joined: 2/15/2019(UTC)
Posts: 10
United States
Location: AZ

Was thanked: 1 time(s) in 1 post(s)
Thanks for the reply! The file being generated is an html. I need an excel version ideally. Is there a way to specifically set the file extension that the report is generated and saved off into the folder with, is my question. Thanks!
epf  
#4 Posted : Wednesday, April 29, 2020 6:42:36 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 205 time(s) in 198 post(s)
You can do that using the Pre-Generation Script of your report output:
Here is a sample to rename your result file to a .txt

Code:
@using System.IO
@{
    ReportOutput output = Model;
    
    var resultPath = output.Report.ResultFilePath;
    var newResultPath = Path.Combine(Path.GetDirectoryName(resultPath),Path.GetFileNameWithoutExtension(resultPath) + ".txt");
    if (File.Exists(newResultPath)) {
        File.Delete(newResultPath);
    }
    File.Move(resultPath, newResultPath);
    output.Report.ResultFilePath = newResultPath;
}    


You can do that for a CSV (Excel), for native Excel file (xlsx), you will need the PDF and Excel Converter (evaluation can be downloaded at https://ariacom.com)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.