Question: I have a requirement to generate excel report as follows.

My query is :

```
select emp_id, emp_name, dept_name
from table AA
union
select emp_id, emp_name, dept_name
from table BB
union
select emp_id, emp_name, dept_name
from table CC;

```

This perfectly gives me the columns with the heading.

But I need the Header text (`" User Generated .......`) to be displayed on the first row (above the column heading)

Any inputs or suggestions ???

[sample expected output](https://i.stack.imgur.com/OtyXz.png)

Answer: 
Yes, there's no problem passing const variable type to another component.
The variable type only affects the behavior of the variable only.

Just pass the variable you desire to the component and accessing it through the target component props.
You can pass it as a props

```js
function Comp1() {
  const comp1Data = "hello";
  return <Comp2 comp1Data={comp1Data} />;
}

function Comp2({ comp1Data }) {
  return comp1Data;
}

```