Data From Database
Import from Database function is used to get data from database.
SheetKraft contains the Data From Database option which can be accessed by the Import From Button present in the SheetKraft Toolbar ( See figure)
The data can be imported from a particular table of the database. Or a Stored Procedure or Manual Query can be used to retrieve data from database.
Case 1: Basic Example
The following guidelines describe how data can be imported from a particular table using Data From Database.
Click on the Import From Button and select the Database option to open this dialogue box.
Click on the browse button next to Connection, to configure the database connection. If the Configuration File is already setup as explained in Desktop & Server Configurations, then this step can be skipped.
Select the table name by clicking on the browse button next to the Table Name.
The database tables are listed in the format <SchemaName>.<TableName>.
After selecting the database table, the data in the database table will be loaded.
Select the required columns in the output by checking on the checkbox corresponding to each column. The columns can be reordered by dragging the headers.
The number of data rows retrieved from the database can be limited bt checking Max rows and entering the required number in the corresponding field.
To get filtered/sorted data, click Filter/Sort and follow the steps given in Filter/Sort. Click Next to get the data without filtering or sorting.
You will be asked where to save the result. To save the data in the Existing WorkSheet, you can input the index of the starting cell where you want to copy the data. Or you can save the data in a New Worksheet.
After entering your choice, click Finish.
Select the procedure by clicking on the browse button next to Procedure.
The following window appears where the stored procedures are listed in the format <SchemaName>.<ProcedureName>.
After selecting the stored procedure, parameters in the procedure, if any, will be loaded.
Enter the parameter values in the field corresponding to each parameter.
Click on Show Preview to display the data that will be retrived. This can also be used to check if there is any error in the parameter values.
Enter the query to retrieve data from the database in the field to Query.
After entering the query, if the query doesnot have any error , the data to be imported will be loaded.