Alen cappelletti


Hi,

I try to develop this script but now I have a brake.

What I must do

I got an array of column like C, E, F, T,... and I must update all cell setting above everyone the char '.

Example: my cell have the value of sun...I must update like 'sum.

This for a problem of import values into integration services of SQL server 2005 (SSIS).

But the loop must be run untill the last row with a value not in all the 65000 and more row.

So action line must be:

1) catch the last row with an value of an column that always have one like the ID of an products....

2) execute a loop trougth a rage of cell until the last row (pooint 1)

2) execute a loop into the column update values with '+cell.text

Under you can see the point where I arrived the question mark is ploblems...

How select range of cell into column

How execute loop trougth the column

Hope someone can help me.

Alen, Italy

-------------

Dim XApp As Object = CreateObject("Excel.Application")

XApp.DisplayAlerts = False

Dim nomeWork1 As String = Dts.Variables("strCostPath").Value.ToString & Dts.Variable("strFileName").Value.ToString

Dim nomeWork2 As String = Replace(nomeWork1, ".xls", "2.xls")

XApp.Workbooks.Open(nomeWork1)

XApp.Range("H1:900").Select()

For Each c As Object In XApp.Selection

c.value = "'" & c.text

Next

XApp.ActiveWorkbook.SaveAs(nomeWork2)

XApp.Workbooks.Close()




Re: update cell value using loop

Spidermans_DarkSide - MSP, VSIP


Hi,

You may want to try this in VBA ( Visual Basic for Applications ) in Excel.

This forum is for VB.Net questions only. See.>>

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=478161&SiteID=1

Try this VBA forum.>>

http://www.programmersheaven.com/mb/vba/Board.aspx S=B20000

Regards,

S_DS