Notifications
Clear all

COMPACTAR PLANILHA

6 Posts
2 Usuários
0 Reactions
1,571 Visualizações
(@arrastao-b)
Posts: 10
Active Member
Topic starter
 

Boa noite amigos.

Antes de postar fiz uma busca e não encontrei, então la vai. Alguém tem alguma sugestão de programa para compactar uma planilha acima de 5mb para mandar por email? O Winrar ou Winzip já tentei mais a proporção de compressão fica em 81% e praticamente não ajude.

Aguardo sugestões.

Grato.

 
Postado : 24/04/2013 4:43 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Boa noite,

Se você usa o Excel 2007 ou posterior, sugiro salvar com a extensão "xlsb".

Abraço

 
Postado : 24/04/2013 4:59 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Boa noite!!

seu tópico foi movido para Excel - Básico!

Att

 
Postado : 24/04/2013 5:25 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Alem da boa dica do colega JValq;
uma outra possibilidade é ,se houver:
Eliminar linhas com formulas não utilizadas
Compacta (reduzir) o tamanho/qualidade de imagens existentes na planilha.
Havia uma materia de capa do site planilhando que recomendava tb copiar as planilhas para um novo arquivo, eliminando-se assim dados/marcações "fantasmas" no arquivo.

o codigo era similar a este:

Option Explicit
Sub SHRINK_EXCEL_FILE_SIZE()

Dim WSheet As Worksheet
Dim CSheet As String 'New Worksheet
Dim OSheet As String 'Old WorkSheet
Dim Col As Long
Dim ECol As Long 'Last Column
Dim lRow As Long
Dim BRow As Long 'Last Row
Dim Pic As Object

For Each WSheet In Worksheets
WSheet.Activate
'Put the sheets in a variable to make it easy to go back and forth
CSheet = WSheet.Name
'Rename the sheet to its name with _Delete at the end
OSheet = CSheet & "_Delete"
WSheet.Name = OSheet
'Add a new sheet and call it the original sheets name
Sheets.Add
ActiveSheet.Name = CSheet
Sheets(OSheet).Activate
'Find the bottom cell of data on each column and find the further row
For Col = 1 To Columns.Count 'Find the actual last bottom row
If Cells(Rows.Count, Col).End(xlUp).Row > BRow Then
BRow = Cells(Rows.Count, Col).End(xlUp).Row
End If
Next

'Find the end cell of data on each row that has data and find the furthest one
For lRow = 1 To BRow 'Find the actual last right column
If Cells(lRow, Columns.Count).End(xlToLeft).Column > ECol Then
ECol = Cells(lRow, Columns.Count).End(xlToLeft).Column
End If
Next

'Copy the REAL set of data
Range(Cells(1, 1), Cells(BRow, ECol)).Copy
Sheets(CSheet).Activate
'Paste Every Thing
Range("A1").PasteSpecial xlPasteAll
'Paste Column Widths
Range("A1").PasteSpecial xlPasteColumnWidths

Sheets(OSheet).Activate
For Each Pic In ActiveSheet.Pictures
Pic.Copy
Sheets(CSheet).Paste
Sheets(CSheet).Pictures(Pic.Index).Top = Pic.Top
Sheets(CSheet).Pictures(Pic.Index).Left = Pic.Left
Next Pic
Sheets(CSheet).Activate

'Reset the variable for the next sheet
BRow = 0
ECol = 0
Next WSheet

' Since, Excel will automatically replace the sheet references for you on your formulas,
' the below part puts them back.
' This is done with a simple replace, replacing _Delete with nothing
For Each WSheet In Worksheets
WSheet.Activate
Cells.Replace "_Delete", ""
Next WSheet

'Roll through the sheets and delete the original fat sheets
For Each WSheet In Worksheets
If Not Len(Replace(WSheet.Name, "_Delete", "")) = Len(WSheet.Name) Then
Application.DisplayAlerts = False
WSheet.Delete
Application.DisplayAlerts = True
End If
Next
End Sub
 
Postado : 24/04/2013 6:13 pm
(@arrastao-b)
Posts: 10
Active Member
Topic starter
 

Reinaldo, no meu caso não posso eliminar nada, pois trata-se de uma tabela dinâmica. A planilha base já esta com as informações necessárias para a base da tabela, mas de qualquer maneira, eu já havia feito esta limpa anteriormente e realmente diminui o tamanho.

Deixo uma pergunta no ar? Qual a diferença de salvar um arquivo 2007 como compatibilidade 2003 e salvar como binário? Pergunto porque realmente o binário deixa o arquivo menor.

Obrigado.

 
Postado : 25/04/2013 10:56 am
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Veja a resposta em : http://social.msdn.microsoft.com/Forums ... 27988ed2f/

 
Postado : 25/04/2013 11:40 am