Forum Discussion
Report Builder export to csv double quotes
We need to use Report Builder to reproduce a custom format for a CSV that was generated with another tool.
The file's peculiarities are mainly two:
1. The values of the headers and the data have to be enclosed in double quotes ("")
2. The report headers are multilingual, and this means that the different translations are treated in the report, so that when exporting to CSV, both the column name and the translation are included in the report. We have managed to hide the column names, but Report Builder inserts a blank line (these are the column names, although they are not displayed) when it performs the export and we want it to disappear.- Anonymous1 year ago
Hi LolaVeci ,
Thank you for your patience! I truly appreciate your time and effort in clarifying your requirements. Your detailed explanation has provided valuable insight.- Right-click on the column header ,Click Expression.
- Update the expression to enclose the header text in double quotes
- Repeat this step for all column headers.
- Right-click on each data field in the Tablix (one column at a time).
- Click Expression.
- Use the following format to enclose the data in double quotes:
- Replace the existing value with:
= """" & Fields!YourColumnName.Value & """" - Repeat this for all data columns(except headers) in the table.
- Replace the existing value with:
Please refer the screenshot for more understanding.
This is the exported csv output.
I hope this solution works for you.If this helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you for being a part of the Microsoft Fabric Community Forum!
11 Replies
- LolaVeciRegular Visitor
I need an export to csv whose result is (Headers and data in quotes, and headers with names containing spaces😞
- AnonymousNot applicable
Hi LolaVeci ,
Thank you for reaching out to the Microsoft Fabric Community Forum about the issue you are encountering.
To export a properly formatted CSV from Report Builder with quoted headers and data, follow below suggestions.It might assist you in resolving the issue.
1.Enclose headers and data in double quotes:
Update expressions in the table cells:
="""" & FieldsValue.Value & """"
For multilingual headers:="""" & Lookup(Parameters!Language.Value, Fields!LanguageCode.Value, Fields!HeaderText.Value, "HeaderDataset") & """"
2.Using Tablix,
- Click on the header row in your table.
- open the Properties Pane (or go to View > Properties).
- Locate the DataElementOutput property.
- Set it to NoOutput.
- Repeat this for all header textboxes.
Refer below screenshot for detailed understanding.If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
- LolaVeciRegular Visitor
This option isn't correct; the headers are repeated on each row, and I don't want that. I only want the headers to appear in the first row.- AnonymousNot applicable
Hi LolaVeci ,
Thanks again for providing the detailed information.To ensure that only the headers appear in the CSV export while hiding the data rows, follow these steps.
1.Modify the DataElementOutput property. Right-click each header textbox , open the Properties Pane, and set DataElementOutput = Output, ensuring the headers appear in the CSV.
2.Next, for the data fields, right-click each field , open the Properties Pane, and set DataElementOutput = NoOutput, which prevents data from being included in the CSV export.3.Additionally, to completely hide data rows, apply row visibility settings. Right-click the entire data row , select "Row Visibility," choose "Hide," and enter the expression =True, ensuring that the rows never appear .
4.Once these settings are applied, run the report in Report Builder, export it as a CSV .Please refer below screenshot.Based on my understanding, I have provided the expected output. If this solution meets your requirements, please consider accepting it as the solution.
Regards,
Pallavi.
- LolaVeciRegular Visitor
If I put No Output, it does not show me the header of the report and if I put Output, it repeats the header. I need it to be displayed like this in Excel:
In Excel it is displayed like this:- AnonymousNot applicable
Hi LolaVeci ,
Thank you for the confirmation.1.Modify expressions for both headers and data fields using below expression:
= """" & Fields!YourField.Value & """"2.Right-click each individual data column except header row.
- Click Properties → Find DataElementOutput.
- Set DataElementOutput = NoOutput
- Do NOT set NoOutput for the entire header row. This would remove the headers completely.
3.Run the report in Report Builder.
Click Export ,then select csv to exprot the file.
Attaching the output screenshot for your reference
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
- AnonymousNot applicable
Hi LolaVeci ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your answer and accept it as answer. It would be greatly appreciated by others in the community who may have the same question.
Thank you for being a part of the Microsoft Fabric Community Forum! - AnonymousNot applicable
Hi LolaVeci ,
Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster.
If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you.
Regards,
Pallavi.