Copying sheets from one Excel to another


#1

Hello friends,
when I try to copy the “Sheet1” contained in 20180718.xlsx (17.4 KB) to the sheet “Foglio1” of another file Arricchimento_2018_07_18_162227.xlsx (14.0 KB)
the column “Numero Polizza” changes its format.
How is it possible to copy and save the file while mantaining the same format?
Thank you so much,
Camilla :slight_smile:


#3

Might be because of this?


#4

Yes I think It is due to this format.
Howis it possible to overcome the problem?
Thank you so much,
Camilla


#5


Try using this Ignore Error…it might work :slight_smile:
I mean if its’s possible to make changes in the excel file


#6

Unfortunately I should make this operations without opening the Excel file.
Do you know if it is possible?
Thank you,
Camilla :slight_smile:


#7

Could you please share your workflow? :slight_smile:


#8

prova2.xaml (140.2 KB)


#9

I frankly don’t find any solution other than changing the excel somehow. Will get back to you if i get any progress on this :slight_smile:
Regards
Niket


#10

Hi @CamiCat

I was looking for the solution to change the numbers without opening the Excel, but couldn’t find any.

However, I do use this simple VBA code within Excel Scope activity to convert my values to actual numbers:

Sub ConvertTextToNumbers()
[A:A].Select
With Selection
.NumberFormat = “0.000”
.Value = .Value
End With
End Sub

You just have to replace the [A:A] to match your column, save it as .vbs file and execute it within Excel Scope activity by using the Invoke VBA activity.

I hope someone knows the way to save the numbers in your desired format without using the Excel Scope activity. Now that I think about it, maybe there is a community package with Excel activity that does that?


#11

Thank you so much @loginerror.
Can you also please share me a VBA code that saves the excel file?
Thank you so much,
Camilla :slight_smile:


#12

You can add “Save Workbook” activity at the end of your Excel scope for that.

No need to use the VBA too excessively, and even this method is an annoying workaround to what we would like -> to be able to save the numeric value by using write range without Excel scope.