如何从数据库中的表生成excel文件,用Java代替本地系统将其保存到azure blob中,并在axure中获取保存的excel工作表的文件路径和大小
发布于 2021-02-02 01:23:49
根据您在注释中的问题,您可以参考下面的代码示例来上传文件:
//Creating a sample file
sourceFile = File.createTempFile("sampleFile", ".txt");
System.out.println("Creating a sample file at: " + sourceFile.toString());
Writer output = new BufferedWriter(new FileWriter(sourceFile));
output.write("Hello Azure!");
output.close();
//Getting a blob reference
CloudBlockBlob blob = container.getBlockBlobReference(sourceFile.getName());
//Creating blob and uploading file to it
System.out.println("Uploading the sample file ");
blob.uploadFromFile(sourceFile.getAbsolutePath());本例使用的是JAVA。我不知道你用的是哪个版本。
参考Azure教程:
HTH。
https://stackoverflow.com/questions/65991655
复制相似问题