0

was Just Wondering Is there any way that we can Copy our Local Content Like XlS sheet to the file system on a remote server (e.g. a SQL Server) using Java?

I dont want Exact Code, just want some Headstart any help is appreciated:)

Pondlife
  • 15,992
  • 6
  • 37
  • 51
RAJ
  • 123
  • 5
  • 16
  • 3
    Just out of curiosity, what is the reason for using Java, considering the likes of http://support.microsoft.com/kb/321686 – beny23 Mar 23 '12 at 09:04
  • can't you utilize 'sharing folders'? or if you want to get dirty setup Samba Share :D – hovanessyan Mar 23 '12 at 09:41
  • 1
    Do you mean "copy an Excel file to the SQL Server file system" or "import the data in the Excel file into a SQL Server table"? – Pondlife Mar 23 '12 at 09:42
  • @beny123...I asked JAVA as I am only comfortaable with it.....:D:D – RAJ Mar 26 '12 at 05:42
  • possible duplicate of [Standard concise way to copy a file in Java?](http://stackoverflow.com/questions/106770/standard-concise-way-to-copy-a-file-in-java) – Pondlife Apr 02 '12 at 13:36

1 Answers1

0

I agree with @beny23, reading a Microsoft format to upload info to Microsoft SQL Server does not sound like a problem where Java would be the first option.

In any case, you just have to consider the parts of your problem. Java can read Excel files (Look for Apache POI). From then, connecting Java to SQL Server is also a solved problem. (Although there several drivers and you might have to try more than one).

madth3
  • 7,275
  • 12
  • 50
  • 74
  • Thkns for response, I have used Apache POI to read XLS file but here I require to copy that xls and paste it to SQl server , is that possible through POI, if it is then certainely My problem is solved – RAJ Mar 26 '12 at 05:41
  • Somewhat repeating @Pondlife's queation, what do you mean by "paste it"? – madth3 Mar 26 '12 at 06:07
  • copying an Excel to SQL server – RAJ Mar 26 '12 at 09:42
  • 1
    @Raj What does "copy an Excel" mean? I can think of at least 3 possible things: copy an Excel file from one filesystem to another one; INSERT an Excel file into a binary column in SQL Server; parse an Excel file and load individual column data into a SQL Server table. Please explain precisely what you mean, otherwise we cannot help you. – Pondlife Mar 28 '12 at 09:31
  • @ All Sorry for not being Specific , It is the first one copying from my file system to SQL servere file system... is that possible? – RAJ Apr 02 '12 at 08:15