Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default instrução OpenText

Estou abrindo um arquivo texto a partir de uma macro. O código é o que anexo
a seguir:

Workbooks.OpenText Filename:="C:\Meus documentos\auxÃ*lio
transporte\BS.txt", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=True, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1,
1), _
Array(2, 1), Array(3, 1), Array(4,4), Array(5, 4), Array(6, 1),
Array(7, 1)), _
TrailingMinusNumbers:=True

O problema é: os campos de data não estão saindo direito. Em algumas linhas
eles aparecem corretamente e em outras aparecem como texto, veja a seguir:
Colunas
1 2 3 4
5 6 7
55036 124 MARCIA ROSARIA SANTOS 11ABR2006 17ABR2006 BS 15
55036 124 MARIA HENRIQUE 16/mar/06 29ABR2006 BS 15
55036 124 LUCIA HELENA CONCEICAO 03ABR2006 07ABR2006 BS 15
55036 124 TANIA REGINA GONZAGA 10ABR2006 13ABR2006 BS 15
55036 159 SUELY BARROSDE OLIVEIRA 20/mar/06 18ABR2006 BS 15

Obs: Quando abro sem o uso da macro, funciona corretamente.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default instrução OpenText

Neia,

You posted in portuguese, the language of this community is English...

De qualquer forma, parece que o problema está ligado ao idioma - a
abreviatura de marco é a mesma em Portugues e em Ingles - mar - mas abril é
diferente - abr/apr. Por isto está lendo corretamente as datas de março como
data, mas como o XL nao sabe interpretar ABR, deixa como texto.

Best,

RGO

"neia" wrote:

Estou abrindo um arquivo texto a partir de uma macro. O código é o que anexo
a seguir:

Workbooks.OpenText Filename:="C:\Meus documentos\auxÃ*lio
transporte\BS.txt", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=True, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1,
1), _
Array(2, 1), Array(3, 1), Array(4,4), Array(5, 4), Array(6, 1),
Array(7, 1)), _
TrailingMinusNumbers:=True

O problema é: os campos de data não estão saindo direito. Em algumas linhas
eles aparecem corretamente e em outras aparecem como texto, veja a seguir:
Colunas
1 2 3 4
5 6 7
55036 124 MARCIA ROSARIA SANTOS 11ABR2006 17ABR2006 BS 15
55036 124 MARIA HENRIQUE 16/mar/06 29ABR2006 BS 15
55036 124 LUCIA HELENA CONCEICAO 03ABR2006 07ABR2006 BS 15
55036 124 TANIA REGINA GONZAGA 10ABR2006 13ABR2006 BS 15
55036 159 SUELY BARROSDE OLIVEIRA 20/mar/06 18ABR2006 BS 15

Obs: Quando abro sem o uso da macro, funciona corretamente.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenText Mike Archer Excel Programming 1 February 13th 06 09:22 PM
opentext banavas[_13_] Excel Programming 3 June 28th 04 02:25 PM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
OpenText bug ? Orlando Magalhães Filho Excel Programming 0 August 1st 03 04:14 AM


All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"