РОман
Дата: Понедельник, 18.03.2013, 14:22 |
Сообщение № 4
[vba]
Код
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.cbr.ru", _ Destination:=Range("A1")) .Name = "www.cbr.ru_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .Refresh BackgroundQuery:=False End With ggf: Sheets("âíåø").Activate Sheets("1").Cells(4, 2) = Sheets("2").Cells(26, 12) 'äàòà Sheets("1").Cells(7, 6) = Sheets("2").Cells(57, 8) / 100 'ñòàâêà ðåôèíàíñèðîâàíèÿ Sheets("1").Cells(8, 6) = CCur(Sheets("2").Cells(63, 6)) 'çîëîòîâàëþòíûå ðåçåðâû 'mosprime Sheets("1").Cells(17, 2) = Sheets("2").Cells(49, 3) Sheets("1").Cells(17, 4) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 6), InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare)), Sheets("2").Cells(49, 6))) / 100 Sheets("1").Cells(17, 5) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 8), InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare)), Sheets("2").Cells(49, 8))) / 100 Sheets("1").Cells(17, 6) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 10), InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare)), Sheets("2").Cells(49, 10))) / 100 'ruonia Sheets("1").Cells(18, 2) = Sheets("2").Cells(51, 3) Sheets("1").Cells(18, 3) = CCur(IIf(InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(51, 6), InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare)), Sheets("2").Cells(51, 6))) / 100
[/vba]
заметил что у меня значение ячейки равно например 8,25 а на той машине "8,25" после вставки из веба ругается на любую страку где есть какое либо преобразование
[vba]
Код
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.cbr.ru", _ Destination:=Range("A1")) .Name = "www.cbr.ru_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .Refresh BackgroundQuery:=False End With ggf: Sheets("âíåø").Activate Sheets("1").Cells(4, 2) = Sheets("2").Cells(26, 12) 'äàòà Sheets("1").Cells(7, 6) = Sheets("2").Cells(57, 8) / 100 'ñòàâêà ðåôèíàíñèðîâàíèÿ Sheets("1").Cells(8, 6) = CCur(Sheets("2").Cells(63, 6)) 'çîëîòîâàëþòíûå ðåçåðâû 'mosprime Sheets("1").Cells(17, 2) = Sheets("2").Cells(49, 3) Sheets("1").Cells(17, 4) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 6), InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare)), Sheets("2").Cells(49, 6))) / 100 Sheets("1").Cells(17, 5) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 8), InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare)), Sheets("2").Cells(49, 8))) / 100 Sheets("1").Cells(17, 6) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 10), InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare)), Sheets("2").Cells(49, 10))) / 100 'ruonia Sheets("1").Cells(18, 2) = Sheets("2").Cells(51, 3) Sheets("1").Cells(18, 3) = CCur(IIf(InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(51, 6), InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare)), Sheets("2").Cells(51, 6))) / 100
[/vba]
заметил что у меня значение ячейки равно например 8,25 а на той машине "8,25" после вставки из веба ругается на любую страку где есть какое либо преобразованиеРОман
Ответить
Сообщение
[vba]
Код
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.cbr.ru", _ Destination:=Range("A1")) .Name = "www.cbr.ru_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .Refresh BackgroundQuery:=False End With ggf: Sheets("âíåø").Activate Sheets("1").Cells(4, 2) = Sheets("2").Cells(26, 12) 'äàòà Sheets("1").Cells(7, 6) = Sheets("2").Cells(57, 8) / 100 'ñòàâêà ðåôèíàíñèðîâàíèÿ Sheets("1").Cells(8, 6) = CCur(Sheets("2").Cells(63, 6)) 'çîëîòîâàëþòíûå ðåçåðâû 'mosprime Sheets("1").Cells(17, 2) = Sheets("2").Cells(49, 3) Sheets("1").Cells(17, 4) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 6), InStr(1, Sheets("2").Cells(49, 6), " ", vbTextCompare)), Sheets("2").Cells(49, 6))) / 100 Sheets("1").Cells(17, 5) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 8), InStr(1, Sheets("2").Cells(49, 8), " ", vbTextCompare)), Sheets("2").Cells(49, 8))) / 100 Sheets("1").Cells(17, 6) = CCur(IIf(InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(49, 10), InStr(1, Sheets("2").Cells(49, 10), " ", vbTextCompare)), Sheets("2").Cells(49, 10))) / 100 'ruonia Sheets("1").Cells(18, 2) = Sheets("2").Cells(51, 3) Sheets("1").Cells(18, 3) = CCur(IIf(InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare) > 0, Left(Sheets("2").Cells(51, 6), InStr(1, Sheets("2").Cells(51, 6), " ", vbTextCompare)), Sheets("2").Cells(51, 6))) / 100
[/vba]
заметил что у меня значение ячейки равно например 8,25 а на той машине "8,25" после вставки из веба ругается на любую страку где есть какое либо преобразованиеАвтор - РОман Дата добавления - 18.03.2013 в 14:22