필터 지우기
필터 지우기

i cannot upload the response file(excel) ; its fine while uploading the predictor

조회 수: 2 (최근 30일)
SABARIESWARAN A
SABARIESWARAN A 2022년 3월 17일
답변: Dinesh 2023년 12월 22일
function [newData1] = importfile(fileToRead1)
%IMPORTFILE(FILETOREAD1)
% Imports data from the specified file
% FILETOREAD1: file to read
% Auto-generated by MATLAB on 17-Mar-2022 21:31:45
% Import the file
sheetName='Sheet1';
[numbers, strings, raw] = xlsread(fileToRead1, sheetName); %#ok<XLSRD>
if ~isempty(numbers)
newData1.data = numbers;
end
if ~isempty(strings)
newData1.textdata = strings;
end
if ~isempty(strings) && ~isempty(numbers)
[strRows, strCols] = size(strings);
[numRows, numCols] = size(numbers);
likelyRow = size(raw,1) - numRows;
% Break the data up into a new structure with one field per column.
if strCols == numCols && likelyRow > 0 && strRows >= likelyRow
newData1.colheaders = strings(likelyRow, :);
end
end

답변 (1개)

Dinesh
Dinesh 2023년 12월 22일
Hello.
The issue is that the Excel file you're trying to upload as a response isn't being accepted, possibly due to the file size or format limitations (inferred from your code). This can occur if the upload mechanism doesn't support the specific Excel file size or if the file format isn't recognized by the system's configuration. To resolve this, ensure the file conforms to size limits, check for the correct file format, and verify that your system has the appropriate permissions set for the file upload.
If needed, here's a code snippet for checking file size before attempting the upload in MATLAB:
fileInfo = dir(fileToRead1);
if fileInfo.bytes < uploadLimitBytes
% Proceed with file upload
else
error('File exceeds the maximum allowed size for upload.');
end
The following links might help you:

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by