Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Macro para abrir excel csv delimitado por puntos y comas.

publicado

Buenas chicos tengo el siguiente problemilla.

Mediante una macro intento acceder a un archivo csv. delimtado con puntos y comas. y al usar  Workbooks.Open Filename:="C:\Users\pc\Desktop\stock.csv"   me la abre mal 

image.thumb.png.56ac083838636e720c1d24b3a2aea015.png

 

Si la abro normal me la abre perfectamente, he intentado un par de cosillas pero nada fracaso total. Si podéis arrojarme un poco de luz sobre esto os lo agradecería mucho.

Un saludo.

 

 

 

Featured Replies

  • 4 months later...
publicado
  • Autor

Doy solución al problema que propuse.

 

  ActiveWorkbook.Queries.Add Name:="stock", Formula:= _
        "let" & Chr(13) & "" & Chr(10) & "    Origen = Csv.Document(File.Contents("UBICACION DEL ARCHIVO""),[Delimiter="";"", Columns=15, Encoding=1252, QuoteStyle=QuoteStyle.None])," & Chr(13) & "" & Chr(10) & "    #""Encabezados promovidos"" = Table.PromoteHeaders(Origen, [PromoteAllScalars=true])," & Chr(13) & "" & Chr(10) & "    #""Tipo cambiado"" = Table.TransformColumnTypes(#""Encabezados promovidos"",{{""Almacén"", Int64.Type}, " & _
        "{""Artículo"", Int64.Type}, {""Denominación"", type text}, {""Fecha Congelado"", type date}, {""Fecha Caducidad"", type date}, {""Lote"", type text}, {""SSCC"", type text}, {""SSCC Superior"", type text}, {""Peso Bruto"", type number}, {""Tara EDTR"", type number}, {""Peso Neto"", type number}, {""Unidades"", type number}, {""Proveedor"", type text}, {""Nombre Prov." & _
        """, type text}, {""Nº Pedido"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & "    #""Tipo cambiado"""

    Sheets.Add After:=ActiveSheet

    With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
        "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=stock;Extended Properties=""""" _
        , Destination:=Range("$A$1")).QueryTable

        .CommandType = xlCmdSql

        .CommandText = Array("SELECT * FROM [stock]")

        .RowNumbers = False

        .FillAdjacentFormulas = False

        .PreserveFormatting = True

        .RefreshOnFileOpen = False

        .BackgroundQuery = True

        .RefreshStyle = xlInsertDeleteCells

        .SavePassword = False

        .SaveData = True

        .AdjustColumnWidth = True

        .RefreshPeriod = 0

        .PreserveColumnInfo = False

        .ListObject.DisplayName = "stock"

        .Refresh BackgroundQuery:=False

    End With
 

 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.