Numbers are not displaying properly in excel reportExcel not properly recalculating valuesExcel Chart not...
Unreachable code, but reachable with exception
Grey hair or white hair
How to create a hard link to an inode (ext4)?
How are such low op-amp input currents possible?
Are babies of evil humanoid species inherently evil?
PTIJ: Why can't I eat anything?
Force user to remove USB token
How does airport security verify that you can carry a battery bank over 100 Wh?
If the Captain's screens are out, does he switch seats with the co-pilot?
Could a cubesat propel itself to Mars?
Is it true that real estate prices mainly go up?
Single word request: Harming the benefactor
2×2×2 rubik's cube corner is twisted!
Is Gradient Descent central to every optimizer?
Aliens englobed the Solar System: will we notice?
Could a cubesat be propelled to the moon?
Examples of a statistic that is not independent of sample's distribution?
How do you like my writing?
Making a sword in the stone, in a medieval world without magic
What is the chance of making a successful appeal to dismissal decision from a PhD program after failing the qualifying exam in the 2nd attempt?
Solving "Resistance between two nodes on a grid" problem in Mathematica
Do f-stop and exposure time perfectly cancel?
Why would one plane in this picture not have gear down yet?
Does a Catoblepas statblock appear in an official D&D 5e product?
Numbers are not displaying properly in excel report
Excel not properly recalculating valuesExcel Chart not displaying X AxisExcel 97-2007 sheet issue not displaying data, completely blankExcel hyperlink not redirecting properly (bug?)Populate images, script not working properlyExcel - displaying numbers and text on cellExcel not adding decimal numbers correctly=SUM() formula not functioning properly in ExcelSQL output not pasting into Excel properlyDisplaying BMPs in Excel
n excel report generation, numbers are displaying 7.70225E+11 but it should display like 770225145579 . Any one please help to solve this issue. My code is,
<?php
include("connection.php");
if(isset($_POST['submit']) && $_POST['submit']=="Download")
{
$payor_code = $_POST['payor_code'];
$corp_code= $_POST['corp_code'];
$pro_type = isset($_POST['product_type']);
$submit_date = $_POST['sub_date'];
$sql= oci_parse($conn, "select * from members ");
oci_execute($sql);
$dat = date("d/m/Y");
$filename = "Report_$dat";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");
$header = array(
"ReceivedDate",
"SubmissionDate",
"PatientName",
"PatientIC",
"PrincipalName",
"PrincipalIC",
"ClaimNo"
);
$fp = fopen('php://output', 'w');
fputcsv($fp, $header);
//$incr = 0;
while($row = oci_fetch_array($sql)) {
$name = $row['RECEIVED_DATE'];
$email = $row['SUBMISSION_DATE'];
$mobile = $row['PATIENT_NAME'];
$address = $row['NRIC_ID'];
$city = $row['PRINCIPAL_NAME'];
$state = $row['PRINCIPAL_NRIC'];
$pincode = $row['CLAIMS_ID'];
$fields = array ($name, $email, $mobile, $address,$city,$state,$pincode);
fputcsv($fp, $fields);
}
}
?>
Please solve this issue. I have to get the proper output after i download the excel report. I dont want to do any manual changes.
php sql microsoft-excel
migrated from stackoverflow.com Apr 11 '14 at 9:06
This question came from our site for professional and enthusiast programmers.
add a comment |
n excel report generation, numbers are displaying 7.70225E+11 but it should display like 770225145579 . Any one please help to solve this issue. My code is,
<?php
include("connection.php");
if(isset($_POST['submit']) && $_POST['submit']=="Download")
{
$payor_code = $_POST['payor_code'];
$corp_code= $_POST['corp_code'];
$pro_type = isset($_POST['product_type']);
$submit_date = $_POST['sub_date'];
$sql= oci_parse($conn, "select * from members ");
oci_execute($sql);
$dat = date("d/m/Y");
$filename = "Report_$dat";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");
$header = array(
"ReceivedDate",
"SubmissionDate",
"PatientName",
"PatientIC",
"PrincipalName",
"PrincipalIC",
"ClaimNo"
);
$fp = fopen('php://output', 'w');
fputcsv($fp, $header);
//$incr = 0;
while($row = oci_fetch_array($sql)) {
$name = $row['RECEIVED_DATE'];
$email = $row['SUBMISSION_DATE'];
$mobile = $row['PATIENT_NAME'];
$address = $row['NRIC_ID'];
$city = $row['PRINCIPAL_NAME'];
$state = $row['PRINCIPAL_NRIC'];
$pincode = $row['CLAIMS_ID'];
$fields = array ($name, $email, $mobile, $address,$city,$state,$pincode);
fputcsv($fp, $fields);
}
}
?>
Please solve this issue. I have to get the proper output after i download the excel report. I dont want to do any manual changes.
php sql microsoft-excel
migrated from stackoverflow.com Apr 11 '14 at 9:06
This question came from our site for professional and enthusiast programmers.
1
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00
add a comment |
n excel report generation, numbers are displaying 7.70225E+11 but it should display like 770225145579 . Any one please help to solve this issue. My code is,
<?php
include("connection.php");
if(isset($_POST['submit']) && $_POST['submit']=="Download")
{
$payor_code = $_POST['payor_code'];
$corp_code= $_POST['corp_code'];
$pro_type = isset($_POST['product_type']);
$submit_date = $_POST['sub_date'];
$sql= oci_parse($conn, "select * from members ");
oci_execute($sql);
$dat = date("d/m/Y");
$filename = "Report_$dat";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");
$header = array(
"ReceivedDate",
"SubmissionDate",
"PatientName",
"PatientIC",
"PrincipalName",
"PrincipalIC",
"ClaimNo"
);
$fp = fopen('php://output', 'w');
fputcsv($fp, $header);
//$incr = 0;
while($row = oci_fetch_array($sql)) {
$name = $row['RECEIVED_DATE'];
$email = $row['SUBMISSION_DATE'];
$mobile = $row['PATIENT_NAME'];
$address = $row['NRIC_ID'];
$city = $row['PRINCIPAL_NAME'];
$state = $row['PRINCIPAL_NRIC'];
$pincode = $row['CLAIMS_ID'];
$fields = array ($name, $email, $mobile, $address,$city,$state,$pincode);
fputcsv($fp, $fields);
}
}
?>
Please solve this issue. I have to get the proper output after i download the excel report. I dont want to do any manual changes.
php sql microsoft-excel
n excel report generation, numbers are displaying 7.70225E+11 but it should display like 770225145579 . Any one please help to solve this issue. My code is,
<?php
include("connection.php");
if(isset($_POST['submit']) && $_POST['submit']=="Download")
{
$payor_code = $_POST['payor_code'];
$corp_code= $_POST['corp_code'];
$pro_type = isset($_POST['product_type']);
$submit_date = $_POST['sub_date'];
$sql= oci_parse($conn, "select * from members ");
oci_execute($sql);
$dat = date("d/m/Y");
$filename = "Report_$dat";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export.csv");
header("Pragma: no-cache");
header("Expires: 0");
$header = array(
"ReceivedDate",
"SubmissionDate",
"PatientName",
"PatientIC",
"PrincipalName",
"PrincipalIC",
"ClaimNo"
);
$fp = fopen('php://output', 'w');
fputcsv($fp, $header);
//$incr = 0;
while($row = oci_fetch_array($sql)) {
$name = $row['RECEIVED_DATE'];
$email = $row['SUBMISSION_DATE'];
$mobile = $row['PATIENT_NAME'];
$address = $row['NRIC_ID'];
$city = $row['PRINCIPAL_NAME'];
$state = $row['PRINCIPAL_NRIC'];
$pincode = $row['CLAIMS_ID'];
$fields = array ($name, $email, $mobile, $address,$city,$state,$pincode);
fputcsv($fp, $fields);
}
}
?>
Please solve this issue. I have to get the proper output after i download the excel report. I dont want to do any manual changes.
php sql microsoft-excel
php sql microsoft-excel
asked Apr 11 '14 at 7:57
user3521999
migrated from stackoverflow.com Apr 11 '14 at 9:06
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Apr 11 '14 at 9:06
This question came from our site for professional and enthusiast programmers.
1
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00
add a comment |
1
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00
1
1
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00
add a comment |
4 Answers
4
active
oldest
votes
You have a couple of options here (though the numbers you flagged look more like unique ID's than numbers). You can potentially:
Manually extend the cell width to see if that is the source of the issue
Type
ctrl 1
, go to excel options, and change the type of the number in the PatientIC and PrincipalIC columns to some type that is consistent
- (If both 1 and 2 fail) Confirm that the source data or process that created the excel spreadsheet is providing / generating the data accurately or in a consistent format
My immediate concern is that there are different formats being applied to different cells, rows and columns. For example, cell A5 and A6 both refer to the month of March, yet the date formatting is different. This may be an issue within the PatientIC and PrincipalIC columns.
add a comment |
You can set the value as string, while adding it to excel. This will prevent the integer number to get converted into scientific notation.
Check this thread PHP Excel - Correct format. To understand why this is happening, check this url Why does Excel treat long numeric strings as scientific notation
add a comment |
Try this code it's works for me :
$objPHPExcel
->getActiveSheet()
->getCellByColumnAndRow($col, $row)
->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
And Good luck !
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
add a comment |
In laravel I have changed format of colum to this
[
'D' => '+#'
]
New contributor
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f740499%2fnumbers-are-not-displaying-properly-in-excel-report%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
You have a couple of options here (though the numbers you flagged look more like unique ID's than numbers). You can potentially:
Manually extend the cell width to see if that is the source of the issue
Type
ctrl 1
, go to excel options, and change the type of the number in the PatientIC and PrincipalIC columns to some type that is consistent
- (If both 1 and 2 fail) Confirm that the source data or process that created the excel spreadsheet is providing / generating the data accurately or in a consistent format
My immediate concern is that there are different formats being applied to different cells, rows and columns. For example, cell A5 and A6 both refer to the month of March, yet the date formatting is different. This may be an issue within the PatientIC and PrincipalIC columns.
add a comment |
You have a couple of options here (though the numbers you flagged look more like unique ID's than numbers). You can potentially:
Manually extend the cell width to see if that is the source of the issue
Type
ctrl 1
, go to excel options, and change the type of the number in the PatientIC and PrincipalIC columns to some type that is consistent
- (If both 1 and 2 fail) Confirm that the source data or process that created the excel spreadsheet is providing / generating the data accurately or in a consistent format
My immediate concern is that there are different formats being applied to different cells, rows and columns. For example, cell A5 and A6 both refer to the month of March, yet the date formatting is different. This may be an issue within the PatientIC and PrincipalIC columns.
add a comment |
You have a couple of options here (though the numbers you flagged look more like unique ID's than numbers). You can potentially:
Manually extend the cell width to see if that is the source of the issue
Type
ctrl 1
, go to excel options, and change the type of the number in the PatientIC and PrincipalIC columns to some type that is consistent
- (If both 1 and 2 fail) Confirm that the source data or process that created the excel spreadsheet is providing / generating the data accurately or in a consistent format
My immediate concern is that there are different formats being applied to different cells, rows and columns. For example, cell A5 and A6 both refer to the month of March, yet the date formatting is different. This may be an issue within the PatientIC and PrincipalIC columns.
You have a couple of options here (though the numbers you flagged look more like unique ID's than numbers). You can potentially:
Manually extend the cell width to see if that is the source of the issue
Type
ctrl 1
, go to excel options, and change the type of the number in the PatientIC and PrincipalIC columns to some type that is consistent
- (If both 1 and 2 fail) Confirm that the source data or process that created the excel spreadsheet is providing / generating the data accurately or in a consistent format
My immediate concern is that there are different formats being applied to different cells, rows and columns. For example, cell A5 and A6 both refer to the month of March, yet the date formatting is different. This may be an issue within the PatientIC and PrincipalIC columns.
answered Apr 11 '14 at 8:06
Nathaniel PayneNathaniel Payne
1212
1212
add a comment |
add a comment |
You can set the value as string, while adding it to excel. This will prevent the integer number to get converted into scientific notation.
Check this thread PHP Excel - Correct format. To understand why this is happening, check this url Why does Excel treat long numeric strings as scientific notation
add a comment |
You can set the value as string, while adding it to excel. This will prevent the integer number to get converted into scientific notation.
Check this thread PHP Excel - Correct format. To understand why this is happening, check this url Why does Excel treat long numeric strings as scientific notation
add a comment |
You can set the value as string, while adding it to excel. This will prevent the integer number to get converted into scientific notation.
Check this thread PHP Excel - Correct format. To understand why this is happening, check this url Why does Excel treat long numeric strings as scientific notation
You can set the value as string, while adding it to excel. This will prevent the integer number to get converted into scientific notation.
Check this thread PHP Excel - Correct format. To understand why this is happening, check this url Why does Excel treat long numeric strings as scientific notation
edited May 23 '17 at 12:41
Community♦
1
1
answered Apr 11 '14 at 8:06
Ramesh Dahiya
add a comment |
add a comment |
Try this code it's works for me :
$objPHPExcel
->getActiveSheet()
->getCellByColumnAndRow($col, $row)
->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
And Good luck !
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
add a comment |
Try this code it's works for me :
$objPHPExcel
->getActiveSheet()
->getCellByColumnAndRow($col, $row)
->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
And Good luck !
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
add a comment |
Try this code it's works for me :
$objPHPExcel
->getActiveSheet()
->getCellByColumnAndRow($col, $row)
->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
And Good luck !
Try this code it's works for me :
$objPHPExcel
->getActiveSheet()
->getCellByColumnAndRow($col, $row)
->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING);
And Good luck !
answered Jul 31 '18 at 11:07
MISSIRIAMISSIRIA
11
11
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
add a comment |
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
1
1
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
Note that the output format is CSV that is generated using data from a database, not an XLS file, so PHPExcel does not apply. Also, PHPExcel is deprecated
– telcoM
Jul 31 '18 at 12:49
add a comment |
In laravel I have changed format of colum to this
[
'D' => '+#'
]
New contributor
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
add a comment |
In laravel I have changed format of colum to this
[
'D' => '+#'
]
New contributor
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
add a comment |
In laravel I have changed format of colum to this
[
'D' => '+#'
]
New contributor
In laravel I have changed format of colum to this
[
'D' => '+#'
]
New contributor
New contributor
answered 13 mins ago
rajesh kharatmolrajesh kharatmol
1
1
New contributor
New contributor
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
add a comment |
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
Welcome to Super User. Can you elaborate on what this does, where and how to use it, and how this fixes the Excel problem? Thanks.
– fixer1234
5 mins ago
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f740499%2fnumbers-are-not-displaying-properly-in-excel-report%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
try extending the width of the cell.
– JW 웃
Apr 11 '14 at 7:58
Beware that Excel works with floating point numbers, which may not require the requisite accuracy for your needs. You might consider casting to strings instead.
– eggyal
Apr 11 '14 at 8:00