My excel sheet read two times - excel

I have created package by below link
How to loop through Excel files and load them into a database using SSIS package?
Package work well but excel read two times and insert data in to table two time.
Please help me
Thanks,
Ramesh Rathod

the example has 2 loops, one i looping excel files and the second each sheet on the file. Are you sure you didn't set the same loop twice? Set up logging on your package, it may help you troubleshoot the problem

Related

Alternative formulas for vba script

I made a VBA function which turns my raw data into a table format since I want to use a pivottable for charts. The problem is that my file need to run on excel online and VBA is not running in a cloud environment.
Is there a way to do this with functions/power query/...
Thanks in advance
Took a while but i managed. It is in fact Excel online compatible Each formula is displayed above the corresponding column. I added some data to make sure it could handle extra data.
=IF(F8<>"",ROWS($G$7:G7),NA#)
=AGGREGATE(15,6,$G$8:$G$32,ROWS($G$7:G7))
=IF(ISNUMBER(H8),IF(ISTEXT(INDEX($B$6:$C$32,H8,1)),INDEX($B$6:$C$32,H8,2),I7),"")
=IF(ISNUMBER(H8),IF(ISTEXT(INDEX($C$7:$D$32,H8,1)),INDEX($C$7:$D$32,H8,2),J7),"")
=IF(ISNUMBER(H8),INDEX(E$8:E$32,$H8),"")
=IF(ISNUMBER(H8),INDEX(F$8:F$32,$H8),"")

Reset Default Workbook Open options

I use VBA in Excel to pull data from different sources (mostly .csv and .xls/.xlsx files) and paste them into my data tables (in the same Excel File I have a data table for each specific data source).
Each of those files comes with different settings. I have created an specific VBA Macro for each of my data sources to process, remove and copy the relevant information of each individual file, and then I call all of the Macros from another Macro. The problem I'm having is that for one of the data sources, when using the Workbooks.Open method, I have had to set the parameter Format to "Nothing" (Format:=5). But this affects then the subsequent macros and therefore the following files are not processed correctly.
I know I have two possibilities: Either I call this macro at the end, after I've processed all the other files or; I set the Format parameter in all of my Macros to the one specific for each of the files configuration. However there must be a way to simply reset the delimiter to the default one used in my Regional Settings. Does anyone knows a solution?
Sorry if there's already a thread with this issue but I've tried looking for it and didn't find any.
Thank you in advance.

Version control on excel files in git

I'm looking for a way to perform version control on excel files in git. I understand this question has been asked before, but I couldn't find an option that will work for an excel file with multiple
sheets in it.
For instance, in the suggestions offered here, one way is to save .xlsx file as a csv file and use git diff. However, this option doesn't work when there are multiple sheets. I'll be able to save only the active sheet as csv file.
The second option that has been suggested on SO is GIT XL. From what I understand from the documentation
of GIT XL, the diff option will allow me to view the lines that are altered in the command prompt.
For example, if there are 10 columns in an excel sheet and I replace the value in all ten columns
how can I view the data that was present previously. To give a better context, the contents of
the sheet in excel is overwritten every time I run a script for different values of parameters.
In such a case, I don't want to re-run the script each time if I want to view the results of a previous run.
The third answer that I found useful is available here, using xls2text. Again, I would like to know how this will work when there are multiple sheets.
Any suggestions will be of great help!

How to copy content from a excel table to another worksheet

I have a table (named as Logs) in Sheet1 to which I am writing through a program. I need to copy the content written to the table Logs to Sheet2 as LogReport when I open the workbook. Is it possible to do this without using macros or Power Query option in Excel. I am working with Excel 2010. I have been searching for a while, but I was unable to find a solution which match the requirement.
Looked through the functions available as well, but I was unable to find a possible solution. Appreciate if I can get some help.
"Is it possible to do this without using macros?"
If under "macros" you mean VBA then the answer is No.

To split multiple sheets in an excel to multiple csv files

I have a single Excel containing many sheets as sheet1, sheet2, sheet3, etc. I need to split this Excel into individual CSVs, i.e.
sheet1--->file1.csv
sheet2-->file2.csv
sheet3-->file3.csv
and so
on...
I need to do this either using PERL or UNIX. I also want to know the record count from each of the individually generated CSVs.
Since I am a beginner in Unix, I spent much time in writing the code and it doesn't seem working.
Please give your suggestions. Thanks in advance.
I was facing the same issue, I guess this post (link) should help you.Batch split xls sheets to csv -
This contains a js code which you just have to put inside the folder where you have all the xls files.It will split the sheets into separate csv and name them following this syntax: {file_name}-{worksheet_name}.csv
Hope this helps.
You can either use the csvkit program:
in2csv --write-sheets "-" -f Masterfile.xlsx
which will generate as many files as they are sheets
Masterfile_0.csv Masterfile_1.csv ...
or you can also use the ssconvert tool from the Gnumeric project:
ssconvert -S Masterfile.xlsx split_file.csv
but the naming scheme is less convenient as each file have the sheet number prepended (they need to be renamed):
split_file.csv.0 split_file.csv.1

Resources