Mon Dec 07, 2009 10:19 am
<table>
<tr>
<td >
<input type="file" id="csvfilebrowse" name="csvfilebrowse" style="width:400px; height:20px" onChange="getfilename();">
<script type="text/javascript">
// <![CDATA[
function getfilename() {
var v_csvfileName = '';
[b]v_csvfileName[/b] += document.getElementById('csvfilebrowse').value;
};
// ]]>
</script>
</td>
</tr>
<tr>
<td align="left">
<%
Workbook workbook = null;
Sheet sheet = null;
String csvFileName = [b]v_csvfileName;[/b]
// Reading Test
//Workbook workbook = Workbook.getWorkbook(new File(file_path+"/reportToExcel.xls"));
workbook = Workbook.getWorkbook(new File(csvFileName));
sheet = workbook.getSheet(0);
for(int i=0;i<sheet.getColumns();i++){
Cell a1 = sheet.getCell(i,0);
String stringa1 = a1.getContents();
}
%>
</td>
</tr>
</table>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.