Read data from excel sheet dynamically and push to SQL

It was to create a table. even after disabling the activity getting the same error.

In your datatable you may have some invalid data, instead of read it from the excel, for testing purpose can you build a datatable and pass it to the insert activity

sorry, but how to do that? Any sample worflow will help

How many columns you have in your database table, use BuildDataTable activity and create those columns in it with similar datatypes respectively.

Then using a Add DataRow activity you can add a single datarow to this datatable and pass it.

If you are facing difficulties with this let me know, else share the database column names with datatypes

Hi,
There are A:S columns and below is the create table query which gives the column names and their datatypes. I will look for the build data table activity tomorrow and see how to get data from excel into it.

“CREATE TABLE public.gmb_test2 (
subject varchar(65000),
received_time datetime,
sender_name varchar(65000),
category varchar(65000),
mailBox_name varchar(65000),
folder_name varchar(65000),
sub_folder_name varchar(65000),
email_count varchar(65000),
snapshot_time datetime,
scope varchar(65000),
subject_replace varchar(65000),
subject_modified varchar(65000),
count_1 varchar(65000),
count_truncated varchar(65000),
time_response_min datetime,
time_response_max datetime,
trimmed_subject varchar(65000),
ageing_tat varchar(65000),
modified_foldername varchar(65000)
);”

Hi Sarathi,

I was able to resolve the issue. Issue was 2 column names were different to one I had in excel file. After making changes it was able to push the data to SQL with no error.

Thanks all and community for the help!

1 Like