.dat to .xls converter
.dat to .xls converter
.dat to .xls converter
.dat to .xls converter
.dat to .xls converter
.dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter
.dat to .xls converter .dat to .xls converter
.dat to .xls converter
Go Back  Xtreme Visual Basic Talk > > > .dat to .xls converter


Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2008, 05:00 AM
mahmouddraj mahmouddraj is offline
Newcomer
 
Join Date: Jul 2008
Posts: 3
Default .dat to .xls converter


Hi guys,
looks a great forum, first time posting and hope i get some help, i am not really pro in VB but trying to learn. however, am trying develop a little app, its a converter from .dat to .xls. the way i wanted is like that:
1) .dat files in server A
2) search for the latest files (up-to-date) that been in that server
3) copy .dat files to server B and rename as .xls

sounds like its simple but not sure how to do it..
any help out there i'll appreciated

Thanks in advance
Reply With Quote
  #2  
Old 07-23-2008, 08:07 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hi mahmouddraj,

I really don't know what a .dat file format looks like... but could I ask, are you using VBA, VB 6.0, or VB.NET for this?

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #3  
Old 07-23-2008, 08:35 AM
darkforcesjedi's Avatar
darkforcesjedi.dat to .xls converter darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

Quote:
Originally Posted by mahmouddraj View Post
Hi guys,
looks a great forum, first time posting and hope i get some help, i am not really pro in VB but trying to learn. however, am trying develop a little app, its a converter from .dat to .xls. the way i wanted is like that:
1) .dat files in server A
2) search for the latest files (up-to-date) that been in that server
3) copy .dat files to server B and rename as .xls

sounds like its simple but not sure how to do it..
any help out there i'll appreciated

Thanks in advance
Are you just renaming the file, or does some format conversion need to occur?
__________________
To err is human; to debug, divine.
Reply With Quote
  #4  
Old 07-24-2008, 01:42 AM
mahmouddraj mahmouddraj is offline
Newcomer
 
Join Date: Jul 2008
Posts: 3
Default

Mike_R

.dat is an output from an application called SAP Front End. at the moment am not using any VB apps, just trying to figure out how to do it first, and am i in the right place to ask.

darkforcesjedi

Only renaming file, no need for any conversion. but cant rename the original file, i have to copy the .dat file from location A and paste it in location B then rename it, but as i have like hundreds of them, cant do one at a time.
Reply With Quote
  #5  
Old 07-24-2008, 08:38 AM
darkforcesjedi's Avatar
darkforcesjedi.dat to .xls converter darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

The easiest thing to do is add a reference (project -> references) to "Microsoft Scripting Runtime" which contains the "Scripting.FileSystemObject"

Then you can do something like:
Code:
Dim f As New FileSystemObject
Dim fil As File

For Each fil In f.GetFolder("C:\").Files
    If LCase(fil.Name) Like "*.dat" Then
        f.CopyFile fil.Path, _
                   "C:\new_location\" & f.GetBaseName(fil.Path) & ".xls"
    End If
Next

Set f = Nothing
__________________
To err is human; to debug, divine.
Reply With Quote
  #6  
Old 07-25-2008, 12:24 AM
mahmouddraj mahmouddraj is offline
Newcomer
 
Join Date: Jul 2008
Posts: 3
Default

Microsoft Scriptin Runtime!! could you tell me what is that, Ohhh am getting confuse all together here...

- lets pretend .dat files in this path
\\serverA\data\test.dat

and i want to copy this file to and rename as xls
\\serverB\data\test.xls

- find the latest files up-to-date and copy + rename
Reply With Quote
  #7  
Old 07-25-2008, 05:42 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline
Out Of Office

Retired Moderator
* Expert *
 
Join Date: Mar 2005
Location: London, UK
Posts: 3,402
Default

Hi,

Quote:
. at the moment am not using any VB apps, just trying to figure out how to do it first, and am i in the right place to ask.
You're going to have to decide which version of VB you are going to use to do this. It makes a difference to the answer and it also makes a difference as to which board your question should be posted in.

For reference, this question is cross-posted here:
http://www.vbforums.com/showthread.php?t=532813

Colin
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.dat to .xls converter
.dat to .xls converter
.dat to .xls converter .dat to .xls converter
.dat to .xls converter
.dat to .xls converter
.dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter .dat to .xls converter
.dat to .xls converter
.dat to .xls converter
 
.dat to .xls converter
.dat to .xls converter
 
-->