Analyzed the grid data structure to understand what information needed to be exported.

Wrote two SQL queries to fetch the required information accurately from the database.

One query retrieved the main grid data (such as user, role, department, or other entity details).

The second query handled additional or related information needed for the export (like linked tables, reference data, or language-specific values)