BrunoKNS Posted October 4, 2011 Report Share Posted October 4, 2011 Como exportar o resultado de uma consulta para excel 2007? Quote Link to comment Share on other sites More sharing options...
0 fulvio Posted October 4, 2011 Report Share Posted October 4, 2011 Bom dia Bruno, Se for pra você mesmo, pode copiar e colar apenas. Quote Link to comment Share on other sites More sharing options...
0 CAIO.EXE Posted October 4, 2011 Report Share Posted October 4, 2011 Bruno,bom dia.Cara, você pode usar o Import/Export Wizardnele você define pra onde quer mandar a query ou tabela, separadores e tudo mais. Quote Link to comment Share on other sites More sharing options...
0 BrunoKNS Posted October 4, 2011 Author Report Share Posted October 4, 2011 Galera, Obrigado pelas dicas, porem preciso fazer isso via código. Quote Link to comment Share on other sites More sharing options...
0 fulvio Posted October 4, 2011 Report Share Posted October 4, 2011 Poderá utilizar a funcionalidade OPENROWSET do sql.http://msdn.microsoft.com/pt-br/library/ms190312.aspx Quote Link to comment Share on other sites More sharing options...
0 BrunoKNS Posted October 4, 2011 Author Report Share Posted October 4, 2011 Poderá utilizar a funcionalidade OPENROWSET do sql.http://msdn.microsoft.com/pt-br/library/ms190312.aspxObrigado pela ajuda, porem agora apresenta os seguintes erros:Msg 7403, Level 16, State 1, Line 2The OLE DB provider "Microsoft.Jet.OLEDB.12.0" has not been registered. Msg 7403, Level 16, State 1, Line 1The OLE DB provider "Microsoft.Jet.OLEDB.8.0" has not been registered. Msg 7308, Level 16, State 1, Line 1OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.Fiz alterações no código e identifiquei esses erros Quote Link to comment Share on other sites More sharing options...
0 fulvio Posted October 4, 2011 Report Share Posted October 4, 2011 A sua sintaxe ficou parecida com isto? (digo parecida pois há outras formas a sintaxe).insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\testing.xls;', 'SELECT * FROM [SheetName$]') select * from SQLServerTableO erro que pode ocorrer é erro de falta de acesso:http://blog.sqlauthority.com/2008/01/02/sq...part-of-the-se/ Quote Link to comment Share on other sites More sharing options...
Question
BrunoKNS
Como exportar o resultado de uma consulta para excel 2007?
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.