Hi all, Excel upload program is not working in SAP CRM 7.2 Service Pack 10 with IE 11. Same is working fine in SP08. Below is the code.
The debugger is not coming into Servervent handler method . any notes suggested ? sorry for posting the big code lines.
<thtmlb:fileUpload id="fileUpDown" />
<thtmlb:button id = "UPLOAD"
iconSrc = "ICON_XLS"
tooltip = "Upload Excel file"
text = "Upload"
onClick = "upload_file( );" />--%>
<thtmlb:textArea id = "Excel_Data"
text = " "
width = "0"
height = "0"
rows = "0" />
<%-- Registering server event--%>
<bsp:htmlbEvent name = "nameUpload"
id = "idUpload"
onClick = "SERVEREVENT"
<%-- serverEvent"--%>
p1 = "p1"
p2 = "p2"
p3 = "p3" />
<script language="javascript" type="text/javascript">
function upload_file( ){
var iRow="1",
jCol="1",
ActiveRows="0",
fileName="",
sValue=" ";
fileName=document.getElementById("<%= controller->component_id %>_fileUpDown").value;
if ( fileName == "" ) {
alert("Upload." + "\n" + " " + "\n" + "Please choose an Excel file as source.");
return;
}
if ( fileName != "") {
<%--alert("Upload." + "\n" + " " + "\n" + "This file is to be uploaded:" + "\n" + fileName);--%>
var r=confirm("Upload." + "\n" + " " + "\n" + "This file is to be uploaded:" + "\n" + fileName);
if (r!=true)
{
return;
}
Excel = new ActiveXObject("Excel.Application");
Book = Excel.Workbooks.Open( fileName );
ActiveRows = Book.Worksheets("Input").Range("A1.IV64000").CurrentRegion.Rows.Count;
<%--ActiveRows = Range("A1.IV64000").CurrentRegion.Rows.Count;--%>
for (iRow=1; iRow<=ActiveRows; iRow++) {
for (jCol=1; jCol<=4; jCol++) {
cData = Book.Worksheets("Input").Cells(iRow,jCol).value;
<%--cData = Cells(iRow,jCol).value;--%>
sValue = sValue.concat(cData,"\n");
}
sValue = sValue.concat("\n\r");
}
document.getElementById("<%= controller->component_id %>_Excel_Data").value = sValue;
Excel.Workbooks.Close;
<%--return statement here calls the server event SERVERVENT--%>
return nameUpload();
}
}
</script>
regards,rama