function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce user 22Salesforce user 22 

Download an excel report in salesforce

Hi All,

I'm very new in salesforce. So, I have no idea how I can acheive my below requirement in salesforce and need your suggestions.

Problem: I have two objects in my sample application.
Work Item:
  • Work Item ID
  • Work Log Date
  • Description
  • Time Taken
  • Invoice(Master relation to Invoice object)
Invoice:
  • Invoice ID
  • Created Date
  • Is Payment received.
  • Hourly Rate
  • Total Working Hour
  • Total Work Charges
  • Payment Charges
  • Total Amount Due
So, in my invoice tab I have a button which will download an excel report for Invoice and work items related to the particular invoice.

Invoice Tab

Sample Excel report








 
Sindhu1234Sindhu1234
Can you provide the details where you got stucked.
Salesforce user 22Salesforce user 22
I can link to a visualforce page and which will create an excel and dowbload it but I'm not sure
- how I can create a spreadsheet object and write it into excel?

I found some example where people creating it in html table and writting it as excel but that's not the correct formatting of an excel file.
 
Rupal KumarRupal Kumar
First you create Report-

User-added image


Create custom button on invoice-
Invoice object -->Buttons, Links, and Actions---->New button oe link
User-added image

Save -->

User-added image

When you click invoice report button ,Report will download in excel file.