Tag: file upload

使用angularjs在MVC中上传Excel文件。 HttpPostedFileBase是空的

我正在尝试使用angular度js在mvc上传一个excel文件。 以下是我的观点代码: <div class="browsebtn" ng-controller = "serviceablectrlr"><input type="file" id="dataFile" name="uploadFile" data-max-size="2097152" accept=".xls, .xlsx" onclick="$('#fileError').hide();" /> </div> <input id="btnUploadExcel" type="button" value="Upload" ng-click="UploadConfirmation()" class="btn btn-yellow" /> 以下是我的控制器代码: var app = angular.module('ProductCatalog'); app.controller('serviceablectrlr', function ($scope, $http) { var apiURL = $("#ProductCatalogApiUrl").val(); var ClearFile = function () { $("#dataFile").val(''); } // pass file object and url to this method […]

没有文件系统访问的FileUploadControl

不幸的是,OLEDB和FileUploadControl似乎都想要一条path。 现在,在用户提交了一个excel文件后,这个文件就可以工作,但是由于0文件系统的访问,在我的服务器上不起作用: FileUploadControl.SaveAs(filePath); ConvertToCSV(filePath); … var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", filePath); var adapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", connectionString); 我看到FileUploadControl公开一个stream和一个字节码。 是否有可能遍历与这些属性的文件?

Filehelpers Excel到Oracle数据库

我想将excel数据导入到oracle数据库。 我有足够的帮助Excel的一部分,你们可以在Oracle方面帮我吗? 是否有可能导入到oracledb文件帮助 ? 请提供一些示例代码以供参考。 谢谢迪

如何从ASP.NET中的HttpInputStream加载excel文件

如何从System.Web.HttpInputStream的ASP页面加载Excel文件? Telerik上传的文件:RadUpload。 感谢任何帮助。 谢谢

无法读取Excel文件 – File.open无效

我使用C#在.NET中构build一个小型网站。 用户必须上传已经实施的Excel文件,扩展名为.xls或.xlsx。 虽然我实际上从Excel文件读取值时遇到了麻烦。 我目前有这样的代码写出来: public ActionResult Index(HttpPostedFileBase file) { string fileName = Path.GetFileName(file.FileName); if (fileName.EndsWith(".xlsx") || (fileName.EndsWith(".xls"))) { // store the file inside ~/App_Data/uploads folder string path = Path.Combine(Server.MapPath("~/App_Data/uploads/"), fileName); file.SaveAs(path); // Get file info int contentLength = file.ContentLength; string contentType = file.ContentType; // Get file data byte[] data = new byte[] { }; using […]

使用Excel VBA将Excel文档上传到Google云端硬盘上的共享文件夹?

对于将file upload到Google Drive的Java,C#和Access VBA,我find了不同的脚本。 但我唯一发现的Excel VBA是一个脚本,将文件保存在本地Google云端硬盘文件夹中,然后等待应用程序同步它。 有没有可能以某种方式直接将Excelfile upload到已与我共享的文件夹? 如果是的话,怎么样?

上传文件到SQL Server,无法正确检索

我的问题是以下几点:我试图用这个方法上传一个Excel文件到数据库: using (SqlConnection connection = new SqlConnection(@"Data Source=TESZT1\SQLEXPRESS;Initial Catalog=Alepitmeny;Persist Security Info=True;User ID=sa;Password=*****")) using (SqlCommand command = connection.CreateCommand()) { byte[] file; using (var stream = new FileStream(ExcelFilePath, FileMode.Open, FileAccess.Read)) { using (var reader = new BinaryReader(stream)) { file = reader.ReadBytes((int)stream.Length); } } command.CommandText = "INSERT INTO Dokumentacio (Elrendelo_ExcelFile) VALUES (@File) SELECT SCOPE_IDENTITY()"; command.Parameters.Add("@File", SqlDbType.VarBinary, file.Length).Value = […]

Jmeter:上传excel,硬编码值

我已经logging了一个excel上传的场景,在接下来的请求中,那些excel中的logging作为parameter passing。 但是,假设我需要改变excel,那么这个请求将如何获得新的价值呢? 参数化似乎不是答案,因为有大量的值。 请帮助。

使用web.py上传Excel

我已经通过稍微修改文档中的示例尝试了下面的代码 class Upload(): def POST(self): web.header('enctype','multipart/form-data') print strftime("%Y-%m-%d %H:%M:%S", gmtime()) x = web.input(file={}) filedir = '/DiginUploads' # change this to the directory you want to store the file in. if 'file' in x: # to check if the file-object is created filepath=x.file.filename.replace('\\','/') # replaces the windows-style slashes with linux ones. filename=filepath.split('/')[-1] # splits the and […]

上传二进制文件并将其像Excel一样保存在服务器中

我有一个JavaScript函数,它读取一个excel文件,并在document.getElementById("content").value返回一个对象ArrayBuffer。value: <script type = "text/javascript"> function readFile(files){ console.log("DEntro de readFile"); var reader = new FileReader(); reader.readAsArrayBuffer(files[0]); reader.onload = function(event){ var arrayBuffer = event.target.result; array = new Uint8Array(arrayBuffer); binaryString = String.fromCharCode.apply(null, array); document.getElementById("fileContent").value = event.target.result; } } </script> 所以,我想知道,我怎样才能把这个对象ArrayBuffer发送到服务器,并在服务器中保存这个ArrayBuffer在一个Excel文件生成原来的Excel。 我能做什么? 编辑我:我想我做错了什么,因为我创build的文件,但奇怪的字符,只有31个字节。 JavaScript的: function readFile(files){ var reader = new FileReader(); reader.readAsArrayBuffer(files[0]); reader.onload = function(event){ document.getElementById("fileContent").value = event.target.result; […]