cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Generate Excel for a SQL query

shubhamshah1412
New Contributor II

Greetings,
I am using a Java Spring boot application that is supposed to respond with an excel based on request. My current approach involves reading data using jdbc drivers, storing them in appropriate data structures, writing them to an excel which will be returned on the output stream.
Was curious to know if we have any provision to directly generate the excel for a given query using some API, libraries etc which I can return on the output stream.

3 REPLIES 3

Kaniz_Fatma
Community Manager
Community Manager

Hi @shubhamshah1412, Yes, some libraries can help you generate an Excel file directly from a query in a Spring Boot application. One such library is Apache POI123.

 

With this method, you can effortlessly produce and retrieve an Excel document from your Spring Boot endpoint. Include the essential dependencies for Apache POI in your project's build file.

 

I trust this information is beneficial to you! Don't hesitate to reach out if you require further assistance. ๐Ÿ˜Š

shubhamshah1412
New Contributor II

Thanks for putting this together @Kaniz_Fatma ,
I see that this approach will help to generate an excel after receiving the data from data bricks in the form of resultSet which has to be parsed.
I believe this approach is the appropriate way to generate excel then.
Please correct my understanding if incorrect.

Kaniz_Fatma
Community Manager
Community Manager

Hi @shubhamshah1412, Yes, If you have any specific questions or need further clarification on implementing this approach, feel free to ask!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group